mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
Replace 'foo.length() >= 1' pattern with !foo.empty()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user