X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/957f03699b05057de4d75af2f19e08f38ade03ff..ef094fa075bc56bcbc33b12159c395ea28afda3b:/include/wx/rawbmp.h diff --git a/include/wx/rawbmp.h b/include/wx/rawbmp.h index a9199e541c..568fd7c667 100644 --- a/include/wx/rawbmp.h +++ b/include/wx/rawbmp.h @@ -101,15 +101,9 @@ - type which can contain the full pixel value (all channels) */ -#ifdef __DIGITALMARS__ template -#else -template -#endif struct WXDLLEXPORT wxPixelFormat { @@ -328,7 +322,7 @@ struct WXDLLEXPORT wxPixelDataOut { m_pRGB += PixelFormat::SizePixel; if ( m_pAlpha ) - m_pAlpha += PixelFormat::SizePixel; + ++m_pAlpha; return *this; } @@ -629,49 +623,33 @@ struct WXDLLEXPORT wxPixelDataOut }; }; -#ifdef __DIGITALMARS__ -template > -class wxPixelData : - public wxPixelDataOut:: wxPixelDataIn -{ -public: - wxPixelData(Image& image) - : wxPixelDataOut:: wxPixelDataIn(image) - { - } - - wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz) - : wxPixelDataOut:: wxPixelDataIn(i, pt, sz) - { - } +#ifdef __VISUALC__ + // typedef-name 'foo' used as synonym for class-name 'bar' + // (VC++ gives this warning each time wxPixelData::Base is used but it + // doesn't make any sense here -- what's wrong with using typedef instead + // of class, this is what it is here for!) + #pragma warning(disable: 4097) +#endif // __VISUALC__ - wxPixelData(Image& i, const wxRect& rect) - : wxPixelDataOut:: wxPixelDataIn(i, rect) - { - } -}; -#else // not __DIGITALMARS__ template > class wxPixelData : public wxPixelDataOut::template wxPixelDataIn { public: - wxPixelData(Image& image) - : wxPixelDataOut::template wxPixelDataIn(image) - { - } + typedef + typename wxPixelDataOut::template wxPixelDataIn + Base; - wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz) - : wxPixelDataOut::template wxPixelDataIn(i, pt, sz) - { - } + wxPixelData(Image& image) : Base(image) { } - wxPixelData(Image& i, const wxRect& rect) - : wxPixelDataOut::template wxPixelDataIn(i, rect) - { - } + wxPixelData(Image& i, const wxRect& rect) : Base(i, rect) { } + + wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz) + : Base(i, pt, sz) + { + } }; -#endif // __DIGITALMARS__ + // some "predefined" pixel data classes typedef wxPixelData wxImagePixelData; @@ -701,6 +679,7 @@ struct WXDLLEXPORT wxPixelIterator : wxPixelData::Iterator #ifdef __VISUALC__ #pragma warning(default: 4355) + #pragma warning(default: 4097) #endif #endif // _WX_RAWBMP_H_BASE_