summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-19 14:43:28 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-01-19 14:43:28 (GMT)
commit9de2ab7fcefba2bc9ce7b483f1643b1d97d58e43 (patch)
treebc1ed3ebea8f96f62ed2582c6358b34063f21299 /Source/cmGlobalGenerator.cxx
parenta6bbbd0f4a9ca9d683000f3302842bc25615e57a (diff)
parent5f69314ea65ebd0de23484e7c91bd12a8bf861f6 (diff)
downloadCMake-9de2ab7fcefba2bc9ce7b483f1643b1d97d58e43.zip
CMake-9de2ab7fcefba2bc9ce7b483f1643b1d97d58e43.tar.gz
CMake-9de2ab7fcefba2bc9ce7b483f1643b1d97d58e43.tar.bz2
Merge topic 'consistent-empty-method'
5f69314e Replace foo.length() pattern with !foo.empty(). fd0c036c Replace 'foo.length() >= 1' pattern with !foo.empty() f09fde2d Replace 'foo.length() > 0' pattern with !foo.empty(). 86b5bdfa Replace 'foo.length() == 0' pattern with foo.empty(). fd7b3712 Replace foo.size() pattern with !foo.empty(). aa773035 Replace !foo.size() pattern with foo.empty(). 64592633 cmListCommand: Use empty() and expand whitespace. 607e1938 Replace 'foo.size() != 0' pattern with !foo.empty(). 930bd478 Replace 'foo.size() == 0' pattern with foo.empty(). d92887ef Replace 'foo.size() > 0' pattern with !foo.empty().
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index f282bad..1745d9a 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -174,7 +174,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
{
path = name;
}
- if((path.size() == 0 || !cmSystemTools::FileExists(path.c_str()))
+ if((path.empty() || !cmSystemTools::FileExists(path.c_str()))
&& (optional==false))
{
return;
@@ -265,7 +265,7 @@ cmGlobalGenerator::IsExportedTargetsFile(const std::string &filename) const
// Find the make program for the generator, required for try compiles
void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
{
- if(this->FindMakeProgramFile.size() == 0)
+ if(this->FindMakeProgramFile.empty())
{
cmSystemTools::Error(
"Generator implementation error, "
@@ -276,7 +276,7 @@ void cmGlobalGenerator::FindMakeProgram(cmMakefile* mf)
{
std::string setMakeProgram =
mf->GetModulesFile(this->FindMakeProgramFile.c_str());
- if(setMakeProgram.size())
+ if(!setMakeProgram.empty())
{
mf->ReadListFile(0, setMakeProgram.c_str());
}
@@ -383,7 +383,7 @@ void
cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
cmMakefile *mf, bool optional)
{
- if(languages.size() == 0)
+ if(languages.empty())
{
cmSystemTools::Error("EnableLanguage must have a lang specified!");
cmSystemTools::SetFatalErrorOccured();
@@ -426,7 +426,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
// If the configuration files path has been set,
// then we are in a try compile and need to copy the enable language
// files from the parent cmake bin dir, into the try compile bin dir
- if(this->ConfiguredFilesPath.size())
+ if(!this->ConfiguredFilesPath.empty())
{
rootBin = this->ConfiguredFilesPath;
}
@@ -1632,7 +1632,7 @@ void cmGlobalGenerator::CheckLocalGenerators()
static_cast<float>(this->LocalGenerators.size()));
}
- if(notFoundMap.size())
+ if(!notFoundMap.empty())
{
std::string notFoundVars;
for(std::map<std::string, std::string>::const_iterator
@@ -2314,7 +2314,7 @@ void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
cpackCommandLines.end());
depends.erase(depends.begin(), depends.end());
std::ostringstream ostr;
- if ( componentsSet->size() > 0 )
+ if (!componentsSet->empty())
{
ostr << "Available install components are:";
std::set<std::string>::iterator it;
@@ -2456,19 +2456,19 @@ void cmGlobalGenerator::EnableMinGWLanguage(cmMakefile *mf)
locations.push_back("c:/mingw/bin");
std::string tgcc = cmSystemTools::FindProgram("gcc", locations);
std::string gcc = "gcc.exe";
- if(tgcc.size())
+ if(!tgcc.empty())
{
gcc = tgcc;
}
std::string tgxx = cmSystemTools::FindProgram("g++", locations);
std::string gxx = "g++.exe";
- if(tgxx.size())
+ if(!tgxx.empty())
{
gxx = tgxx;
}
std::string trc = cmSystemTools::FindProgram("windres", locations);
std::string rc = "windres.exe";
- if(trc.size())
+ if(!trc.empty())
{
rc = trc;
}