X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b931f7ee94f9168cc95f2c360647c172cc169adb..fef5c55604e20e2a90843a2278b1f5c8c817dcee:/src/common/imaggif.cpp 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