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
This commit is contained in:
Stefan Neis
2005-04-16 16:03:42 +00:00
parent 711f6fce1d
commit 1fd87ff764

View File

@@ -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] ) {