summaryrefslogtreecommitdiffstats
path: root/Source/cmSiteNameCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-15 22:39:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-18 13:25:25 (GMT)
commit5f69314ea65ebd0de23484e7c91bd12a8bf861f6 (patch)
treed50bbf578696dfa13e36dbf684de70a2a0c913d8 /Source/cmSiteNameCommand.cxx
parentfd0c036c0c3e5e6be685e64caecdcbad4b3e744c (diff)
downloadCMake-5f69314ea65ebd0de23484e7c91bd12a8bf861f6.zip
CMake-5f69314ea65ebd0de23484e7c91bd12a8bf861f6.tar.gz
CMake-5f69314ea65ebd0de23484e7c91bd12a8bf861f6.tar.bz2
Replace foo.length() pattern with !foo.empty().
Diffstat (limited to 'Source/cmSiteNameCommand.cxx')
-rw-r--r--Source/cmSiteNameCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmSiteNameCommand.cxx b/Source/cmSiteNameCommand.cxx
index e61caab..927888b 100644
--- a/Source/cmSiteNameCommand.cxx
+++ b/Source/cmSiteNameCommand.cxx
@@ -66,7 +66,7 @@ bool cmSiteNameCommand
&host, 0, 0, cmSystemTools::OUTPUT_NONE);
// got the hostname
- if (host.length())
+ if (!host.empty())
{
// remove any white space from the host name
std::string hostRegExp = "[ \t\n\r]*([^\t\n\r ]*)[ \t\n\r]*";
@@ -77,7 +77,7 @@ bool cmSiteNameCommand
host = hostReg.match(1);
}
- if(host.length())
+ if(!host.empty())
{
siteName = host;
}