diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-01-14 23:06:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-18 13:25:24 (GMT) |
commit | d92887efabad6a91e221588d0dc7a0bffd91a9f7 (patch) | |
tree | 0436e742b7efd6071e01879b90fd71d5890d8b1c /Source/cmLocalGenerator.cxx | |
parent | f3e92d281682ee482b1425675b9fccd372cd01f3 (diff) | |
download | CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.zip CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.tar.gz CMake-d92887efabad6a91e221588d0dc7a0bffd91a9f7.tar.bz2 |
Replace 'foo.size() > 0' pattern with !foo.empty().
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7b54b88..04106dc 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1427,7 +1427,7 @@ std::string cmLocalGenerator::GetIncludeFlags( } std::string flags = includeFlags.str(); // remove trailing separators - if((sep[0] != ' ') && flags.size()>0 && flags[flags.size()-1] == sep[0]) + if((sep[0] != ' ') && !flags.empty() && flags[flags.size()-1] == sep[0]) { flags[flags.size()-1] = ' '; } @@ -2906,7 +2906,7 @@ cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local, assert(in_remote[0] != '\"'); // The local path should never have a trailing slash. - assert(local.size() > 0 && !(local[local.size()-1] == "")); + assert(!local.empty() && !(local[local.size()-1] == "")); // If the path is already relative then just return the path. if(!cmSystemTools::FileIsFullPath(in_remote.c_str())) @@ -2998,7 +2998,7 @@ cmLocalGenerator::ConvertToRelativePath(const std::vector<std::string>& local, // the trailing slash in the output. for(unsigned int i=common; i < remote.size(); ++i) { - if(relative.size() > 0) + if(!relative.empty()) { relative += "/"; } |