diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-15 21:58:10 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-18 13:25:25 (GMT) |
commit | fd0c036c0c3e5e6be685e64caecdcbad4b3e744c (patch) | |
tree | 98e33d676ae86721e70d74ad2ed4c31b723e6cbe /Source/cmFileCommand.cxx | |
parent | f09fde2d21ef0c97f0ed1b8c6849f0d7055bc24e (diff) | |
download | CMake-fd0c036c0c3e5e6be685e64caecdcbad4b3e744c.zip CMake-fd0c036c0c3e5e6be685e64caecdcbad4b3e744c.tar.gz CMake-fd0c036c0c3e5e6be685e64caecdcbad4b3e744c.tar.bz2 |
Replace 'foo.length() >= 1' pattern with !foo.empty()
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aab256a..2c92db2 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; |