mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 21:00:01 -05:00
Port all cmOStringStream to std::ostringstream.
All compilers hosting CMake support the std class.
This commit is contained in:
@@ -68,7 +68,7 @@ bool cmListFileParser::ParseFile()
|
||||
bom != cmListFileLexer_BOM_UTF8)
|
||||
{
|
||||
cmListFileLexer_SetFileName(this->Lexer, 0, 0);
|
||||
cmOStringStream m;
|
||||
std::ostringstream m;
|
||||
m << "File\n " << this->FileName << "\n"
|
||||
<< "starts with a Byte-Order-Mark that is not UTF-8.";
|
||||
this->Makefile->IssueMessage(cmake::FATAL_ERROR, m.str());
|
||||
@@ -108,7 +108,7 @@ bool cmListFileParser::ParseFile()
|
||||
}
|
||||
else
|
||||
{
|
||||
cmOStringStream error;
|
||||
std::ostringstream error;
|
||||
error << "Error in cmake code at\n"
|
||||
<< this->FileName << ":" << token->line << ":\n"
|
||||
<< "Parse error. Expected a newline, got "
|
||||
@@ -120,7 +120,7 @@ bool cmListFileParser::ParseFile()
|
||||
}
|
||||
else
|
||||
{
|
||||
cmOStringStream error;
|
||||
std::ostringstream error;
|
||||
error << "Error in cmake code at\n"
|
||||
<< this->FileName << ":" << token->line << ":\n"
|
||||
<< "Parse error. Expected a command name, got "
|
||||
@@ -268,7 +268,7 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
|
||||
token->type == cmListFileLexer_Token_Space) {}
|
||||
if(!token)
|
||||
{
|
||||
cmOStringStream error;
|
||||
std::ostringstream error;
|
||||
error << "Error in cmake code at\n" << this->FileName << ":"
|
||||
<< cmListFileLexer_GetCurrentLine(this->Lexer) << ":\n"
|
||||
<< "Parse error. Function missing opening \"(\".";
|
||||
@@ -277,7 +277,7 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
|
||||
}
|
||||
if(token->type != cmListFileLexer_Token_ParenLeft)
|
||||
{
|
||||
cmOStringStream error;
|
||||
std::ostringstream error;
|
||||
error << "Error in cmake code at\n" << this->FileName << ":"
|
||||
<< cmListFileLexer_GetCurrentLine(this->Lexer) << ":\n"
|
||||
<< "Parse error. Expected \"(\", got "
|
||||
@@ -355,7 +355,7 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
|
||||
else
|
||||
{
|
||||
// Error.
|
||||
cmOStringStream error;
|
||||
std::ostringstream error;
|
||||
error << "Error in cmake code at\n" << this->FileName << ":"
|
||||
<< cmListFileLexer_GetCurrentLine(this->Lexer) << ":\n"
|
||||
<< "Parse error. Function missing ending \")\". "
|
||||
@@ -367,7 +367,7 @@ bool cmListFileParser::ParseFunction(const char* name, long line)
|
||||
}
|
||||
}
|
||||
|
||||
cmOStringStream error;
|
||||
std::ostringstream error;
|
||||
error << "Error in cmake code at\n"
|
||||
<< this->FileName << ":" << lastLine << ":\n"
|
||||
<< "Parse error. Function missing ending \")\". "
|
||||
@@ -389,7 +389,7 @@ bool cmListFileParser::AddArgument(cmListFileLexer_Token* token,
|
||||
}
|
||||
bool isError = (this->Separation == SeparationError ||
|
||||
delim == cmListFileArgument::Bracket);
|
||||
cmOStringStream m;
|
||||
std::ostringstream m;
|
||||
m << "Syntax " << (isError? "Error":"Warning") << " in cmake code at\n"
|
||||
<< " " << this->FileName << ":" << token->line << ":"
|
||||
<< token->column << "\n"
|
||||
|
||||
Reference in New Issue
Block a user