From 6c28fd3379ca2de91953a43f609cf3d726107bec Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 14 Jun 2001 15:16:45 +0000 Subject: [PATCH] fixed indentation and warnings/bugs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index 5045805f8b..a798ea580b 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -766,15 +766,18 @@ bool wxImage::LoadFile( const wxString& filename, long type ) // We want to use wxFileSystem for virtual FS compatibility wxFileSystem fsys; wxFSFile *file = fsys.OpenFile(filename); - if (!file) { - wxLogError(_("Can't open file '%s'"), filename); + if (!file) + { + wxLogError(_("Can't open file '%s'"), filename.c_str()); return FALSE; - } + } wxInputStream *stream = file->GetStream(); - if (!stream) { - wxLogError(_("Can't open stream for file '%s'"), filename); + if (!stream) + { + wxLogError(_("Can't open stream for file '%s'"), filename.c_str()); return FALSE; - } + } + return LoadFile(*stream, type); #else // !wxUSE_STREAMS return FALSE; @@ -787,15 +790,17 @@ bool wxImage::LoadFile( const wxString& filename, const wxString& mimetype ) // We want to use wxFileSystem for virtual FS compatibility wxFileSystem fsys; wxFSFile *file = fsys.OpenFile(filename); - if (!file) { - wxLogError(_("Can't open file '%s'"), filename); + if (!file) + { + wxLogError(_("Can't open file '%s'"), filename.c_str()); return FALSE; - } + } wxInputStream *stream = file->GetStream(); - if (!stream) { - wxLogError(_("Can't open stream for file '%s'"), filename); + if (!stream) + { + wxLogError(_("Can't open stream for file '%s'"), filename.c_str()); return FALSE; - } + } return LoadFile(*stream, mimetype); #else // !wxUSE_STREAMS return FALSE; -- 2.45.2