Commit 84db9ee5 authored by Ben Boeckel's avatar Ben Boeckel Committed by Ben Boeckel
Browse files

SystemTools: Take strings in AddTranslationPath

The arguments are turned into strings right away.

Change-Id: I9dfdc37f2317270da2878632d8e02142a641beda
parent 2c2f6604
......@@ -3051,7 +3051,7 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_relative)
return SystemTools::CollapseFullPath(in_relative, 0);
}
void SystemTools::AddTranslationPath(const char * a, const char * b)
void SystemTools::AddTranslationPath(const kwsys_stl::string& a, const kwsys_stl::string& b)
{
kwsys_stl::string path_a = a;
kwsys_stl::string path_b = b;
......@@ -3089,7 +3089,7 @@ void SystemTools::AddKeepPath(const char* dir)
{
kwsys_stl::string cdir;
Realpath(SystemTools::CollapseFullPath(dir).c_str(), cdir);
SystemTools::AddTranslationPath(cdir.c_str(), dir);
SystemTools::AddTranslationPath(cdir, dir);
}
void SystemTools::CheckTranslationPath(kwsys_stl::string & path)
......@@ -3207,7 +3207,7 @@ kwsys_stl::string SystemTools::CollapseFullPath(const char* in_path,
// collapsed, so I am going to try to comment it out, and see what hits the
// fan, hopefully quickly.
// Commented out line below:
//SystemTools::AddTranslationPath(newPath.c_str(), in_path);
//SystemTools::AddTranslationPath(newPath, in_path);
SystemTools::CheckTranslationPath(newPath);
#ifdef _WIN32
......@@ -4917,8 +4917,8 @@ void SystemTools::ClassInitialize()
// Add the translation to keep the logical path name.
if(!cwd_changed.empty() && !pwd_changed.empty())
{
SystemTools::AddTranslationPath(cwd_changed.c_str(),
pwd_changed.c_str());
SystemTools::AddTranslationPath(cwd_changed,
pwd_changed);
}
}
}
......
......@@ -806,7 +806,7 @@ public:
/**
* Add an entry in the path translation table.
*/
static void AddTranslationPath(const char * dir, const char * refdir);
static void AddTranslationPath(const kwsys_stl::string& dir, const kwsys_stl::string& refdir);
/**
* If dir is different after CollapseFullPath is called,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment