summaryrefslogtreecommitdiff
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-15 22:58:10 +0100
committerStephen Kelly <steveire@gmail.com>2015-01-18 14:25:25 +0100
commitfd0c036c0c3e5e6be685e64caecdcbad4b3e744c (patch)
tree98e33d676ae86721e70d74ad2ed4c31b723e6cbe /Source/cmFileCommand.cxx
parentf09fde2d21ef0c97f0ed1b8c6849f0d7055bc24e (diff)
downloadcmake-fd0c036c0c3e5e6be685e64caecdcbad4b3e744c.tar.gz
Replace 'foo.length() >= 1' pattern with !foo.empty()
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index aab256aea4..2c92db2472 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -745,7 +745,7 @@ bool cmFileCommand::HandleStringsCommand(std::vector<std::string> const& args)
// A non-string character has been found. Check if the current
// string matches the requirements. We require that the length
// be at least one no matter what the user specified.
- if(s.length() >= minlen && s.length() >= 1 &&
+ if(s.length() >= minlen && !s.empty() &&
(!have_regex || regex.find(s.c_str())))
{
output_size += static_cast<int>(s.size()) + 1;