mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Add defaultPath global var and use it instead of creating Path objects all the time a filename is queried and/or xml file is read.
svn path=/trunk/; revision=38352
This commit is contained in:
parent
c5c0af3081
commit
03a011db89
3 changed files with 6 additions and 5 deletions
|
@ -161,9 +161,8 @@ NormalizeFilename ( const string& filename )
|
|||
{
|
||||
if ( filename == "" )
|
||||
return "";
|
||||
Path path;
|
||||
string normalizedPath = path.Fixup ( filename, true );
|
||||
string relativeNormalizedPath = path.RelativeFromWorkingDirectory ( normalizedPath );
|
||||
string normalizedPath = defaultPath.Fixup ( filename, true );
|
||||
string relativeNormalizedPath = defaultPath.RelativeFromWorkingDirectory ( normalizedPath );
|
||||
return FixSeparator ( relativeNormalizedPath );
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
const Path defaultPath;
|
||||
|
||||
/* static */ string
|
||||
Environment::GetVariable ( const string& name )
|
||||
{
|
||||
|
@ -259,8 +261,7 @@ Project::ExecuteInvocations ()
|
|||
void
|
||||
Project::ReadXml ()
|
||||
{
|
||||
Path path;
|
||||
head = XMLLoadFile ( xmlfile, path, xmlbuildfiles );
|
||||
head = XMLLoadFile ( xmlfile, defaultPath, xmlbuildfiles );
|
||||
node = NULL;
|
||||
for ( size_t i = 0; i < head->subElements.size (); i++ )
|
||||
{
|
||||
|
|
|
@ -51,6 +51,7 @@ extern std::string sSep;
|
|||
extern std::string sBadSep;
|
||||
extern char cSep;
|
||||
extern char cBadSep;
|
||||
extern const Path defaultPath;
|
||||
|
||||
#ifdef WIN32
|
||||
#define DEF_EXEPREFIX ""
|
||||
|
|
Loading…
Reference in a new issue