Browse Source

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.
Brad King 15 years ago
parent
commit
c8ea2705a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmCoreTryCompile.cxx

+ 1 - 1
Source/cmCoreTryCompile.cxx

@@ -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()))
       {