Fix wxGTK/MSW build in wxDIB.

Don't define wxMSW-specific wxDIB::CreatePalette() method when not building
wxMSW.

Closes #17248.
This commit is contained in:
Kolya Kosenko
2016-03-09 15:42:51 +01:00
committed by Vadim Zeitlin
parent 6f80021950
commit da195023c1
2 changed files with 4 additions and 4 deletions

View File

@@ -79,10 +79,10 @@ public:
// the DIB after this (but the caller should do it) // the DIB after this (but the caller should do it)
HBITMAP Detach() { HBITMAP hbmp = m_handle; m_handle = 0; return hbmp; } HBITMAP Detach() { HBITMAP hbmp = m_handle; m_handle = 0; return hbmp; }
#if wxUSE_PALETTE #if defined(__WXMSW__) && wxUSE_PALETTE
// create a palette for this DIB (always a trivial/default one for 24bpp) // create a palette for this DIB (always a trivial/default one for 24bpp)
wxPalette *CreatePalette() const; wxPalette *CreatePalette() const;
#endif // wxUSE_PALETTE #endif // defined(__WXMSW__) && wxUSE_PALETTE
// save the DIB as a .BMP file to the file with the given name // save the DIB as a .BMP file to the file with the given name
bool Save(const wxString& filename); bool Save(const wxString& filename);

View File

@@ -509,7 +509,7 @@ HGLOBAL wxDIB::ConvertFromBitmap(HBITMAP hbmp)
// palette support // palette support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if wxUSE_PALETTE #if defined(__WXMSW__) && wxUSE_PALETTE
wxPalette *wxDIB::CreatePalette() const wxPalette *wxDIB::CreatePalette() const
{ {
@@ -582,7 +582,7 @@ wxPalette *wxDIB::CreatePalette() const
return palette; return palette;
} }
#endif // wxUSE_PALETTE #endif // defined(__WXMSW__) && wxUSE_PALETTE
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxImage support // wxImage support