X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/68b4e4cff00ea79be15867ecf640d451584f3dd3..7ca4ac63835adef8226b655013a8a84b416c8171:/src/xrc/xmlres.cpp diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 3b4ddb5fb6..d85ca8d459 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -21,19 +21,20 @@ #ifndef WX_PRECOMP #include "wx/intl.h" + #include "wx/log.h" + #include "wx/panel.h" + #include "wx/frame.h" + #include "wx/dialog.h" + #include "wx/settings.h" #endif #ifndef __WXWINCE__ #include #endif -#include "wx/dialog.h" -#include "wx/panel.h" -#include "wx/frame.h" #include "wx/wfstream.h" #include "wx/filesys.h" #include "wx/filename.h" -#include "wx/log.h" #include "wx/tokenzr.h" #include "wx/fontenum.h" #include "wx/module.h" @@ -41,7 +42,6 @@ #include "wx/image.h" #include "wx/fontmap.h" #include "wx/artprov.h" -#include "wx/settings.h" #include "wx/xml/xml.h" @@ -1497,7 +1497,7 @@ struct XRCID_record static XRCID_record *XRCID_Records[XRCID_TABLE_SIZE] = {NULL}; -static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = -2) +static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = wxID_NONE) { int index = 0; @@ -1521,7 +1521,7 @@ static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = -2) (*rec_var)->next = NULL; wxChar *end; - if (value_if_not_found != -2) + if (value_if_not_found != wxID_NONE) (*rec_var)->id = value_if_not_found; else { @@ -1542,7 +1542,8 @@ static int XRCID_Lookup(const wxChar *str_id, int value_if_not_found = -2) static void AddStdXRCID_Records(); -/*static*/ int wxXmlResource::GetXRCID(const wxChar *str_id) +/*static*/ +int wxXmlResource::GetXRCID(const wxChar *str_id, int value_if_not_found) { static bool s_stdIDsAdded = false; @@ -1552,7 +1553,7 @@ static void AddStdXRCID_Records(); AddStdXRCID_Records(); } - return XRCID_Lookup(str_id); + return XRCID_Lookup(str_id, value_if_not_found); }