diff options
Diffstat (limited to 'Source/cmCLocaleEnvironmentScope.cxx')
-rw-r--r-- | Source/cmCLocaleEnvironmentScope.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmCLocaleEnvironmentScope.cxx b/Source/cmCLocaleEnvironmentScope.cxx index 28e8f2efc..c6c38f83c 100644 --- a/Source/cmCLocaleEnvironmentScope.cxx +++ b/Source/cmCLocaleEnvironmentScope.cxx @@ -2,11 +2,11 @@ file Copyright.txt or https://cmake.org/licensing for details. */ #include "cmCLocaleEnvironmentScope.h" -#include "cmSystemTools.h" - #include <sstream> #include <utility> +#include "cmSystemTools.h" + cmCLocaleEnvironmentScope::cmCLocaleEnvironmentScope() { this->SetEnv("LANGUAGE", ""); @@ -45,10 +45,9 @@ void cmCLocaleEnvironmentScope::SetEnv(std::string const& key, cmCLocaleEnvironmentScope::~cmCLocaleEnvironmentScope() { - for (backup_map_t::const_iterator i = this->EnvironmentBackup.begin(); - i != this->EnvironmentBackup.end(); ++i) { + for (auto const& envb : this->EnvironmentBackup) { std::ostringstream tmp; - tmp << i->first << "=" << i->second; + tmp << envb.first << "=" << envb.second; cmSystemTools::PutEnv(tmp.str()); } } |