X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7a3a5a51bdbd57aac569ee19b80bade37db3101..132422c4b93a0fe5d4f313350adf2c13423c07ac:/src/xrc/xmlres.cpp diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 5134702c50..0e1b2943ab 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -8,7 +8,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "xmlres.h" #endif @@ -103,7 +103,7 @@ bool wxXmlResource::Load(const wxString& filemask) fnd = wxXmlFindFirst; else fnd = filemask; - while (!!fnd) + while (!fnd.empty()) { // NB: Load() accepts both filenames and URLs (should probably be // changed to filenames only, but embedded resources currently @@ -841,13 +841,11 @@ wxString wxXmlResourceHandler::GetText(const wxString& param, bool translate) #endif } } - else - { - // If wxXRC_USE_LOCALE is not set, then the string is already in - // system's default encoding in ANSI build, so we don't have to - // do anything special here. - return str2; - } + + // If wxXRC_USE_LOCALE is not set, then the string is already in + // system's default encoding in ANSI build, so we don't have to + // do anything special here. + return str2; } @@ -902,7 +900,8 @@ bool wxXmlResourceHandler::GetBool(const wxString& param, bool defaultv) wxString v = GetParamValue(param); v.MakeLower(); if (!v) return defaultv; - else return (v == wxT("1")); + + return (v == wxT("1")); } @@ -1120,7 +1119,8 @@ wxSize wxXmlResourceHandler::GetSize(const wxString& param) return wxDefaultSize; } } - else return wxSize(sx, sy); + + return wxSize(sx, sy); } @@ -1159,7 +1159,8 @@ wxCoord wxXmlResourceHandler::GetDimension(const wxString& param, wxCoord defaul return defaultv; } } - else return sx; + + return sx; } @@ -1306,12 +1307,10 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param) m_node = oldnode; return sysfont; } - else - { - m_node = oldnode; - return wxFont(isize, ifamily, istyle, iweight, - underlined, facename, enc); - } + + m_node = oldnode; + return wxFont(isize, ifamily, istyle, iweight, + underlined, facename, enc); }