Author: hpoussin Date: Wed Sep 19 16:06:39 2007 New Revision: 29104
URL: http://svn.reactos.org/svn/reactos?rev=29104&view=rev Log: Fix weird bug in Project::ResolveProperties(), which was modifying the string given in argument
Modified: trunk/reactos/tools/rbuild/project.cpp trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/project.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/project.cpp?re... ============================================================================== --- trunk/reactos/tools/rbuild/project.cpp (original) +++ trunk/reactos/tools/rbuild/project.cpp Wed Sep 19 16:06:39 2007 @@ -196,7 +196,7 @@ }
string -Project::ResolveNextProperty ( string& s ) const +Project::ResolveNextProperty ( const string& s ) const { size_t i = s.find ( "${" ); if ( i == string::npos ) @@ -215,7 +215,7 @@ string propertyName = s.substr ( i + 2, propertyNameLength ); const Property* property = LookupProperty ( propertyName ); if ( property != NULL ) - return s.replace ( i, propertyNameLength + 3, property->value ); + return string ( s ).replace ( i, propertyNameLength + 3, property->value ); } } return s;
Modified: trunk/reactos/tools/rbuild/rbuild.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=2... ============================================================================== --- trunk/reactos/tools/rbuild/rbuild.h (original) +++ trunk/reactos/tools/rbuild/rbuild.h Wed Sep 19 16:06:39 2007 @@ -251,7 +251,7 @@ const std::string& GetProjectFilename () const; std::string ResolveProperties ( const std::string& s ) const; private: - std::string ResolveNextProperty ( std::string& s ) const; + std::string ResolveNextProperty ( const std::string& s ) const; const Property* LookupProperty ( const std::string& name ) const; void SetConfigurationOption ( char* s, std::string name,