From 931e055d8c2e113b9cabb9282d9742ae78c4d802 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 5 Jan 2015 20:31:31 +0100 Subject: Port all cmOStringStream to std::ostringstream. All compilers hosting CMake support the std class. --- Source/cmCommandArgumentParserHelper.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Source/cmCommandArgumentParserHelper.cxx') diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index 64b67c968d..747b7e434a 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -103,7 +103,7 @@ char* cmCommandArgumentParserHelper::ExpandSpecialVariable(const char* key, } return this->EmptyVariable; } - cmOStringStream e; + std::ostringstream e; e << "Syntax $" << key << "{} is not supported. " << "Only ${}, $ENV{}, and $CACHE{} are allowed."; this->SetError(e.str()); @@ -118,7 +118,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) } if(this->FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0) { - cmOStringStream ostr; + std::ostringstream ostr; ostr << this->FileLine; return this->AddString(ostr.str()); } @@ -136,7 +136,7 @@ char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) cmSystemTools::IsSubDirectory(this->FileName, this->Makefile->GetHomeOutputDirectory())) { - cmOStringStream msg; + std::ostringstream msg; cmListFileBacktrace bt(this->Makefile->GetLocalGenerator()); cmListFileContext lfc; lfc.FilePath = this->FileName; @@ -253,7 +253,7 @@ bool cmCommandArgumentParserHelper::HandleEscapeSymbol break; default: { - cmOStringStream e; + std::ostringstream e; e << "Invalid escape sequence \\" << symbol; this->SetError(e.str()); } @@ -335,7 +335,7 @@ int cmCommandArgumentParserHelper::LexInput(char* buf, int maxlen) void cmCommandArgumentParserHelper::Error(const char* str) { unsigned long pos = static_cast(this->InputBufferPos); - cmOStringStream ostr; + std::ostringstream ostr; ostr << str << " (" << pos << ")"; this->SetError(ostr.str()); } -- cgit v1.2.1