X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/79fa23744b2c622ebe9ff89a3ee8c8ec8017ee3b..a148cfb64451d6553cf66d1075b654e54e908210:/src/common/xpmdecod.cpp diff --git a/src/common/xpmdecod.cpp b/src/common/xpmdecod.cpp index 3b33f948ac..ad80cbf883 100644 --- a/src/common/xpmdecod.cpp +++ b/src/common/xpmdecod.cpp @@ -115,9 +115,7 @@ license is as follows: #include "wx/intl.h" #include -#ifdef __VISUALC__ #include -#endif #include "wx/xpmdecod.h" @@ -129,7 +127,7 @@ bool wxXPMDecoder::CanRead(wxInputStream& stream) if ( !stream.Read(buf, WXSIZEOF(buf)) ) return FALSE; - stream.SeekI(-WXSIZEOF(buf), wxFromCurrent); + stream.SeekI(-(off_t)WXSIZEOF(buf), wxFromCurrent); return memcmp(buf, "/* XPM */", WXSIZEOF(buf)) == 0; } @@ -145,7 +143,7 @@ wxImage wxXPMDecoder::ReadFile(wxInputStream& stream) wxCharBuffer buffer(length); char *xpm_buffer = (char *)buffer.data(); - if ( stream.Read(xpm_buffer, length).LastError() == wxSTREAM_READ_ERROR ) + if ( stream.Read(xpm_buffer, length).GetLastError() == wxSTREAM_READ_ERROR ) return wxNullImage; xpm_buffer[length] = '\0'; @@ -659,7 +657,7 @@ struct wxXPMColourMapData { unsigned char R,G,B; }; -WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap) +WX_DECLARE_STRING_HASH_MAP(wxXPMColourMapData, wxXPMColourMap); wxImage wxXPMDecoder::ReadData(const char **xpm_data) {