X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b931f7ee94f9168cc95f2c360647c172cc169adb..e0c5c96f67eaf13ccbd378616bdf98c8dba01e78:/src/common/imaggif.cpp?ds=sidebyside diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index b2a1cdf793..3a64963f92 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -7,7 +7,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "imaggif.h" #endif @@ -116,14 +116,8 @@ bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image), bool wxGIFHandler::DoCanRead( wxInputStream& stream ) { - wxGIFDecoder *decod; - bool ok; - - decod = new wxGIFDecoder(&stream); - ok = decod->CanRead(); - delete decod; - - return ok; + wxGIFDecoder decod(&stream); + return decod.CanRead(); } #endif // wxUSE_STREAMS