$VARNAME or ${VARNAME} where VARNAME contains alphanumeric characters and
'_' only. '$' must be escaped ('\$') in order to be taken literally.
*/
-extern wxString wxExpandEnvVars(const char *sz);
+extern wxString wxExpandEnvVars(const wxString &sz);
/*
Split path into parts removing '..' in progress
void SetExpandEnvVars(bool bDoIt = TRUE) { m_bExpandEnvVars = bDoIt; }
// does expansion only if needed
wxString ExpandEnvVars(const wxString& str) const
- { return IsExpandingEnvVars() ? wxExpandEnvVars(str) : str; }
+ {
+ wxString tmp; // Required for BC++
+ if (IsExpandingEnvVars())
+ tmp = wxExpandEnvVars(str);
+ else
+ tmp = str;
+ return tmp;
+ }
protected:
static bool IsImmutable(const char *szKey)