From: Stefan Neis Date: Sat, 16 Apr 2005 16:03:42 +0000 (+0000) Subject: Moved enum definition out of function body to work around compiler bug. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/1fd87ff764d6f83972b7dc5b144a2bb93ff2baf6 Moved enum definition out of function body to work around compiler bug. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/config.cpp b/src/common/config.cpp index d346b50bff..8be69dc194 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -293,24 +293,25 @@ wxConfigPathChanger::~wxConfigPathChanger() // understands both Unix and Windows (but only under Windows) environment // variables expansion: i.e. $var, $(var) and ${var} are always understood // and in addition under Windows %var% is also. + +// don't change the values the enum elements: they must be equal +// to the matching [closing] delimiter. +enum Bracket +{ + Bracket_None, + Bracket_Normal = ')', + Bracket_Curly = '}', +#ifdef __WXMSW__ + Bracket_Windows = '%', // yeah, Windows people are a bit strange ;-) +#endif + Bracket_Max +}; + wxString wxExpandEnvVars(const wxString& str) { wxString strResult; strResult.Alloc(str.Len()); - // don't change the values the enum elements: they must be equal - // to the matching [closing] delimiter. - enum Bracket - { - Bracket_None, - Bracket_Normal = ')', - Bracket_Curly = '}', -#ifdef __WXMSW__ - Bracket_Windows = '%', // yeah, Windows people are a bit strange ;-) -#endif - Bracket_Max - }; - size_t m; for ( size_t n = 0; n < str.Len(); n++ ) { switch ( str[n] ) {