X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f80ea77b4a8bac4ab005bfc592f9cd3262ffa397..7bd236e6da74203ba429941d3f9643291494b420:/src/xrc/xh_bmp.cpp diff --git a/src/xrc/xh_bmp.cpp b/src/xrc/xh_bmp.cpp index 0853104360..4e61d5074e 100644 --- a/src/xrc/xh_bmp.cpp +++ b/src/xrc/xh_bmp.cpp @@ -8,10 +8,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "xh_bmp.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -19,6 +15,8 @@ #pragma hdrstop #endif +#if wxUSE_XRC + #include "wx/xrc/xh_bmp.h" #include "wx/bitmap.h" @@ -31,7 +29,9 @@ wxBitmapXmlHandler::wxBitmapXmlHandler() wxObject *wxBitmapXmlHandler::DoCreateResource() { - return new wxBitmap(GetBitmap(wxT(""))); + // NB: empty parameter name means "take directly from this node's next + // instead of from subnode with given name" + return new wxBitmap(GetBitmap(wxEmptyString)); } bool wxBitmapXmlHandler::CanHandle(wxXmlNode *node) @@ -48,10 +48,14 @@ wxIconXmlHandler::wxIconXmlHandler() wxObject *wxIconXmlHandler::DoCreateResource() { - return new wxIcon(GetIcon(wxT(""))); + // NB: empty parameter name means "take directly from this node's next + // instead of from subnode with given name" + return new wxIcon(GetIcon(wxEmptyString)); } bool wxIconXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxIcon")); } + +#endif // wxUSE_XRC