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:
@@ -293,24 +293,25 @@ wxConfigPathChanger::~wxConfigPathChanger()
|
|||||||
// understands both Unix and Windows (but only under Windows) environment
|
// understands both Unix and Windows (but only under Windows) environment
|
||||||
// variables expansion: i.e. $var, $(var) and ${var} are always understood
|
// variables expansion: i.e. $var, $(var) and ${var} are always understood
|
||||||
// and in addition under Windows %var% is also.
|
// 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 wxExpandEnvVars(const wxString& str)
|
||||||
{
|
{
|
||||||
wxString strResult;
|
wxString strResult;
|
||||||
strResult.Alloc(str.Len());
|
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;
|
size_t m;
|
||||||
for ( size_t n = 0; n < str.Len(); n++ ) {
|
for ( size_t n = 0; n < str.Len(); n++ ) {
|
||||||
switch ( str[n] ) {
|
switch ( str[n] ) {
|
||||||
|
Reference in New Issue
Block a user