Author: fireball
Date: Fri Dec 26 05:03:16 2008
New Revision: 38352
URL:
http://svn.reactos.org/svn/reactos?rev=38352&view=rev
Log:
- 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.
Modified:
trunk/reactos/tools/rbuild/module.cpp
trunk/reactos/tools/rbuild/project.cpp
trunk/reactos/tools/rbuild/rbuild.h
Modified: trunk/reactos/tools/rbuild/module.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/module.cpp?re…
==============================================================================
--- trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/module.cpp [iso-8859-1] Fri Dec 26 05:03:16 2008
@@ -161,9 +161,8 @@
{
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 );
}
Modified: trunk/reactos/tools/rbuild/project.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/project.cpp?r…
==============================================================================
--- trunk/reactos/tools/rbuild/project.cpp [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/project.cpp [iso-8859-1] Fri Dec 26 05:03:16 2008
@@ -25,6 +25,8 @@
using std::string;
using std::vector;
+const Path defaultPath;
+
/* static */ string
Environment::GetVariable ( const string& name )
{
@@ -259,8 +261,7 @@
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++ )
{
Modified: trunk/reactos/tools/rbuild/rbuild.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/rbuild.h?rev=…
==============================================================================
--- trunk/reactos/tools/rbuild/rbuild.h [iso-8859-1] (original)
+++ trunk/reactos/tools/rbuild/rbuild.h [iso-8859-1] Fri Dec 26 05:03:16 2008
@@ -51,6 +51,7 @@
extern std::string sBadSep;
extern char cSep;
extern char cBadSep;
+extern const Path defaultPath;
#ifdef WIN32
#define DEF_EXEPREFIX ""