mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
Fix weird bug in Project::ResolveProperties(), which was modifying the string given in argument
svn path=/trunk/; revision=29104
This commit is contained in:
parent
a756421600
commit
a7a5e5a486
2 changed files with 3 additions and 3 deletions
|
@ -196,7 +196,7 @@ Project::LookupProperty ( const string& name ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
string
|
string
|
||||||
Project::ResolveNextProperty ( string& s ) const
|
Project::ResolveNextProperty ( const string& s ) const
|
||||||
{
|
{
|
||||||
size_t i = s.find ( "${" );
|
size_t i = s.find ( "${" );
|
||||||
if ( i == string::npos )
|
if ( i == string::npos )
|
||||||
|
@ -215,7 +215,7 @@ Project::ResolveNextProperty ( string& s ) const
|
||||||
string propertyName = s.substr ( i + 2, propertyNameLength );
|
string propertyName = s.substr ( i + 2, propertyNameLength );
|
||||||
const Property* property = LookupProperty ( propertyName );
|
const Property* property = LookupProperty ( propertyName );
|
||||||
if ( property != NULL )
|
if ( property != NULL )
|
||||||
return s.replace ( i, propertyNameLength + 3, property->value );
|
return string ( s ).replace ( i, propertyNameLength + 3, property->value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
|
|
@ -251,7 +251,7 @@ public:
|
||||||
const std::string& GetProjectFilename () const;
|
const std::string& GetProjectFilename () const;
|
||||||
std::string ResolveProperties ( const std::string& s ) const;
|
std::string ResolveProperties ( const std::string& s ) const;
|
||||||
private:
|
private:
|
||||||
std::string ResolveNextProperty ( std::string& s ) const;
|
std::string ResolveNextProperty ( const std::string& s ) const;
|
||||||
const Property* LookupProperty ( const std::string& name ) const;
|
const Property* LookupProperty ( const std::string& name ) const;
|
||||||
void SetConfigurationOption ( char* s,
|
void SetConfigurationOption ( char* s,
|
||||||
std::string name,
|
std::string name,
|
||||||
|
|
Loading…
Reference in a new issue