From 24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Tue, 14 Jun 2016 22:37:36 +0200 Subject: Prefer istringstream and ostringstream over stringstream. Use istringsream for parsing, ostringstream for generation. --- Source/cmCLocaleEnvironmentScope.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/cmCLocaleEnvironmentScope.cxx') diff --git a/Source/cmCLocaleEnvironmentScope.cxx b/Source/cmCLocaleEnvironmentScope.cxx index ee9acdefbf..a19dbaeef3 100644 --- a/Source/cmCLocaleEnvironmentScope.cxx +++ b/Source/cmCLocaleEnvironmentScope.cxx @@ -45,7 +45,7 @@ void cmCLocaleEnvironmentScope::SetEnv(std::string const& key, if (value.empty()) { cmSystemTools::UnsetEnv(key.c_str()); } else { - std::stringstream tmp; + std::ostringstream tmp; tmp << key << "=" << value; cmSystemTools::PutEnv(tmp.str()); } @@ -55,7 +55,7 @@ cmCLocaleEnvironmentScope::~cmCLocaleEnvironmentScope() { for (backup_map_t::const_iterator i = this->EnvironmentBackup.begin(); i != this->EnvironmentBackup.end(); ++i) { - std::stringstream tmp; + std::ostringstream tmp; tmp << i->first << "=" << i->second; cmSystemTools::PutEnv(tmp.str()); } -- cgit v1.2.1