Commit 560bcdbb authored by Brad King's avatar Brad King
Browse files

SystemTools: Factor out common `const char* GetEnv()` private implementation

Remove the last calls to the GetEnv methods with this signature from
KWSys itself.

Change-Id: I9cdb2b060776a00bb698b396c9b33450237cd0b7
parent 1c147abb
......@@ -523,7 +523,7 @@ void SystemTools::GetPath(std::vector<std::string>& path, const char* env)
}
}
const char* SystemTools::GetEnv(const char* key)
const char* SystemTools::GetEnvImpl(const char* key)
{
const char *v = 0;
#if defined(_WIN32)
......@@ -540,9 +540,14 @@ const char* SystemTools::GetEnv(const char* key)
return v;
}
const char* SystemTools::GetEnv(const char* key)
{
return SystemTools::GetEnvImpl(key);
}
const char* SystemTools::GetEnv(const std::string& key)
{
return SystemTools::GetEnv(key.c_str());
return SystemTools::GetEnvImpl(key.c_str());
}
bool SystemTools::GetEnv(const char* key, std::string& result)
......
......@@ -984,6 +984,7 @@ private:
std::vector<std::string>(),
bool no_system_path = false);
static const char* GetEnvImpl(const char* key);
/**
* Path translation table from dir to refdir
......
Markdown is supported
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