cmGlobalGenerator: Don't use else after a return.

This commit is contained in:
Stephen Kelly 2015-05-27 21:40:39 +02:00
parent 52919ac8ac
commit 80b433b05e

View File

@ -87,18 +87,16 @@ bool cmGlobalGenerator::SetGeneratorPlatform(std::string const& p,
{ {
return true; return true;
} }
else
{ std::ostringstream e;
std::ostringstream e; e <<
e << "Generator\n"
"Generator\n" " " << this->GetName() << "\n"
" " << this->GetName() << "\n" "does not support platform specification, but platform\n"
"does not support platform specification, but platform\n" " " << p << "\n"
" " << p << "\n" "was specified.";
"was specified."; mf->IssueMessage(cmake::FATAL_ERROR, e.str());
mf->IssueMessage(cmake::FATAL_ERROR, e.str()); return false;
return false;
}
} }
bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts, bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts,
@ -108,18 +106,15 @@ bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts,
{ {
return true; return true;
} }
else std::ostringstream e;
{ e <<
std::ostringstream e; "Generator\n"
e << " " << this->GetName() << "\n"
"Generator\n" "does not support toolset specification, but toolset\n"
" " << this->GetName() << "\n" " " << ts << "\n"
"does not support toolset specification, but toolset\n" "was specified.";
" " << ts << "\n" mf->IssueMessage(cmake::FATAL_ERROR, e.str());
"was specified."; return false;
mf->IssueMessage(cmake::FATAL_ERROR, e.str());
return false;
}
} }
std::string cmGlobalGenerator::SelectMakeProgram( std::string cmGlobalGenerator::SelectMakeProgram(