summaryrefslogtreecommitdiffstats
path: root/Source/cmCoreTryCompile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-15 22:04:33 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-01-18 13:25:24 (GMT)
commitfd7b37129360364531ddfeda7edb6e34ba773d00 (patch)
tree701d9b298e1030b901a507b436e162810af3b8cc /Source/cmCoreTryCompile.cxx
parentaa773035b7f4a1aefd860d0b9e80f134bd4a4547 (diff)
downloadCMake-fd7b37129360364531ddfeda7edb6e34ba773d00.zip
CMake-fd7b37129360364531ddfeda7edb6e34ba773d00.tar.gz
CMake-fd7b37129360364531ddfeda7edb6e34ba773d00.tar.bz2
Replace foo.size() pattern with !foo.empty().
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r--Source/cmCoreTryCompile.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index 5850338..60d8dd9 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -201,13 +201,13 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
else
{
// only valid for srcfile signatures
- if (compileDefs.size())
+ if (!compileDefs.empty())
{
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
"COMPILE_DEFINITIONS specified on a srcdir type TRY_COMPILE");
return -1;
}
- if (copyFile.size())
+ if (!copyFile.empty())
{
this->Makefile->IssueMessage(cmake::FATAL_ERROR,
"COPY_FILE specified on a srcdir type TRY_COMPILE");
@@ -371,7 +371,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
fprintf(fout, "set(CMAKE_SUPPRESS_REGENERATION 1)\n");
fprintf(fout, "link_directories(${LINK_DIRECTORIES})\n");
// handle any compile flags we need to pass on
- if (compileDefs.size())
+ if (!compileDefs.empty())
{
fprintf(fout, "add_definitions( ");
for (size_t i = 0; i < compileDefs.size(); ++i)
@@ -547,7 +547,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
std::string copyFileErrorMessage;
this->FindOutputFile(targetName);
- if ((res==0) && (copyFile.size()))
+ if ((res==0) && !copyFile.empty())
{
if(this->OutputFile.empty() ||
!cmSystemTools::CopyFileAlways(this->OutputFile,