Internals: Add more const. No functional change intended.

This commit is contained in:
Wilson Snyder
2021-11-13 13:50:44 -05:00
parent 4cb5c1e1db
commit 37e3c6da70
85 changed files with 1172 additions and 1115 deletions
+2 -2
View File
@@ -72,7 +72,7 @@
string V3Os::getenvStr(const string& envvar, const string& defaultValue) {
#if defined(_MSC_VER)
// Note: MinGW does not offer _dupenv_s
char* envvalue = nullptr;
const char* const envvalue = nullptr;
_dupenv_s(&envvalue, nullptr, envvar.c_str());
if (envvalue != nullptr) {
const std::string result{envvalue};
@@ -82,7 +82,7 @@ string V3Os::getenvStr(const string& envvar, const string& defaultValue) {
return defaultValue;
}
#else
if (const char* envvalue = getenv(envvar.c_str())) {
if (const char* const envvalue = getenv(envvar.c_str())) {
return envvalue;
} else {
return defaultValue;