Use same type in both cases of '?:' operator

Both possible result values need to be convertible to the same type.
Some compilers fail to recognize that they can construct std::string
from the empty string literal, so state it explicitly.
This commit is contained in:
Brad King 2010-06-29 10:01:59 -04:00
parent 295b5b60df
commit c8ea2705a7
1 changed files with 1 additions and 1 deletions

View File

@ -178,7 +178,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
const char* rulesOverrideBase = "CMAKE_USER_MAKE_RULES_OVERRIDE";
std::string rulesOverrideLang =
rulesOverrideBase + (lang ? std::string("_") + lang : "");
rulesOverrideBase + (lang ? std::string("_") + lang : std::string(""));
if(const char* rulesOverridePath =
this->Makefile->GetDefinition(rulesOverrideLang.c_str()))
{