Commit ffe94132 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

SystemTools: use char instead of const char*

Everything is one character anyways, remove the level of indirection.

Change-Id: I26a59acc4778b93ed68de098e5640c7835d5ee43
parent b3d598b0
......@@ -334,9 +334,9 @@ class SystemToolsTranslationMap :
void SystemTools::GetPath(kwsys_stl::vector<kwsys_stl::string>& path, const char* env)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
const char* pathSep = ";";
const char pathSep = ';';
#else
const char* pathSep = ":";
const char pathSep = ':';
#endif
if(!env)
{
......@@ -351,7 +351,7 @@ void SystemTools::GetPath(kwsys_stl::vector<kwsys_stl::string>& path, const char
kwsys_stl::string pathEnv = cpathEnv;
// A hack to make the below algorithm work.
if(!pathEnv.empty() && pathEnv[pathEnv.length()-1] != pathSep[0])
if(!pathEnv.empty() && *pathEnv.rbegin() != pathSep)
{
pathEnv += pathSep;
}
......
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