summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackGenerator.cxx4
-rw-r--r--Source/cmDocumentation.cxx4
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmStringCommand.cxx2
-rw-r--r--Source/cmake.cxx4
5 files changed, 8 insertions, 8 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index b7ef090..f21fcf6 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -926,7 +926,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
if (NULL !=mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
- if (absoluteDestFiles.length()>0) {
+ if (!absoluteDestFiles.empty()) {
absoluteDestFiles +=";";
}
absoluteDestFiles +=
@@ -1356,7 +1356,7 @@ int cmCPackGenerator::PrepareGroupingKind()
groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING");
}
- if (groupingType.length()>0)
+ if (!groupingType.empty())
{
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
<< this->Name << "]"
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index a268d12..f4e3a75 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -162,7 +162,7 @@ bool cmDocumentation::PrintRequestedDocumentation(std::ostream& os)
// given stream.
cmsys::ofstream* fout = 0;
std::ostream* s = &os;
- if(i->Filename.length() > 0)
+ if(!i->Filename.empty())
{
fout = new cmsys::ofstream(i->Filename.c_str(), std::ios::out);
if(fout)
@@ -877,7 +877,7 @@ bool cmDocumentation::PrintHelp(std::ostream& os)
//----------------------------------------------------------------------------
const char* cmDocumentation::GetNameString() const
{
- if(this->NameString.length() > 0)
+ if(!this->NameString.empty())
{
return this->NameString.c_str();
}
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index d4ba89a..84b34d9 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2297,7 +2297,7 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
for(unsigned int i=1; i < components.size(); ++i)
{
// Only the last component can be empty to avoid double slashes.
- if(components[i].length() > 0 || (i == (components.size()-1)))
+ if(!components[i].empty() || (i == (components.size()-1)))
{
if(!first)
{
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx
index ddfb748..3e606d7 100644
--- a/Source/cmStringCommand.cxx
+++ b/Source/cmStringCommand.cxx
@@ -386,7 +386,7 @@ bool cmStringCommand::RegexMatchAll(std::vector<std::string> const& args)
this->SetError(e);
return false;
}
- if(output.length() > 0)
+ if(!output.empty())
{
output += ";";
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 2a2f2ab..7accec2 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -909,7 +909,7 @@ void cmake::SetDirectoriesFromFile(const char* arg)
}
// If there is a CMakeCache.txt file, use its settings.
- if(cachePath.length() > 0)
+ if(!cachePath.empty())
{
cmCacheManager* cachem = this->GetCacheManager();
cmCacheManager::CacheIterator it = cachem->NewIterator();
@@ -925,7 +925,7 @@ void cmake::SetDirectoriesFromFile(const char* arg)
}
// If there is a CMakeLists.txt file, use it as the source tree.
- if(listPath.length() > 0)
+ if(!listPath.empty())
{
this->SetHomeDirectory(listPath);
this->SetStartDirectory(listPath);