summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorMatthias Maennich <matthias@maennich.net>2017-09-20 20:50:20 (GMT)
committerBrad King <brad.king@kitware.com>2017-09-28 11:23:40 (GMT)
commit8cc33aeaec2798c9ff5a3af23e361ee22fa2ba95 (patch)
tree61965212780847921f4312b2b17d72240ba82cd6 /Source/cmGlobalXCodeGenerator.cxx
parentffefdb2c084e1e2d46c4d8133dd7aa7bcef79b85 (diff)
downloadCMake-8cc33aeaec2798c9ff5a3af23e361ee22fa2ba95.zip
CMake-8cc33aeaec2798c9ff5a3af23e361ee22fa2ba95.tar.gz
CMake-8cc33aeaec2798c9ff5a3af23e361ee22fa2ba95.tar.bz2
Replace several occurrences of empty string comparisons by string::empty()
Fix issues diagnosed by clang-tidy [readability-container-size-empty] Signed-off-by: Matthias Maennich <matthias@maennich.net>
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 9375f60..e9950d9 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -1280,7 +1280,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateBuildPhase(
const char* name, const char* name2, cmGeneratorTarget* target,
const std::vector<cmCustomCommand>& commands)
{
- if (commands.size() == 0 && strcmp(name, "CMake ReRun") != 0) {
+ if (commands.empty() && strcmp(name, "CMake ReRun") != 0) {
return nullptr;
}
cmXCodeObject* buildPhase =
@@ -2651,7 +2651,7 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
std::string linkDirs;
for (std::vector<std::string>::const_iterator libDir = libDirs.begin();
libDir != libDirs.end(); ++libDir) {
- if (libDir->size() && *libDir != "/usr/lib") {
+ if (!libDir->empty() && *libDir != "/usr/lib") {
// Now add the same one but append
// $(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) to it:
linkDirs += " ";
@@ -2814,7 +2814,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateOrGetPBXGroup(
// If it's the default source group (empty name) then put the source file
// directly in the tgroup...
//
- if (std::string(sg->GetFullName()) == "") {
+ if (std::string(sg->GetFullName()).empty()) {
this->GroupNameMap[s] = tgroup;
return tgroup;
}
@@ -3253,7 +3253,7 @@ void cmGlobalXCodeGenerator::CreateXCodeDependHackTarget(
void cmGlobalXCodeGenerator::OutputXCodeProject(
cmLocalGenerator* root, std::vector<cmLocalGenerator*>& generators)
{
- if (generators.size() == 0) {
+ if (generators.empty()) {
return;
}
// Skip local generators that are excluded from this project.