diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-11-05 22:44:29 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-11-05 22:44:29 (GMT) |
commit | 443180fb9915eefe0b232875505632ffb9fabb95 (patch) | |
tree | 199ad41d1266d213e4c0e449a11177837e4bf246 /Source/cmCPluginAPI.cxx | |
parent | f52bcc2ac1b3dddeca2320d8320a9406101c732d (diff) | |
download | CMake-443180fb9915eefe0b232875505632ffb9fabb95.zip CMake-443180fb9915eefe0b232875505632ffb9fabb95.tar.gz CMake-443180fb9915eefe0b232875505632ffb9fabb95.tar.bz2 |
cmCPluginAPI: Fix clang-tidy findings
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r-- | Source/cmCPluginAPI.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index b70074e..d1f8446 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -408,7 +408,7 @@ char CCONV* cmExpandVariablesInString(void* arg, const char* source, std::string result = mf->ExpandVariablesInString( barf, (escapeQuotes ? true : false), (atOnly ? true : false)); char* res = static_cast<char*>(malloc(result.size() + 1)); - if (result.size()) { + if (!result.empty()) { strcpy(res, result.c_str()); } res[result.size()] = '\0'; @@ -570,7 +570,7 @@ void* CCONV cmAddSource(void* arg, void* arg2) rsf->GetProperties() = osf->Properties; for (std::vector<std::string>::iterator i = osf->Depends.begin(); i != osf->Depends.end(); ++i) { - rsf->AddDepend(i->c_str()); + rsf->AddDepend(*i); } // Create the proxy for the real source file. @@ -676,7 +676,7 @@ void CCONV cmSourceFileSetName(void* arg, const char* name, const char* dir, std::string hname = pathname; if (cmSystemTools::FileExists(hname.c_str())) { sf->SourceName = cmSystemTools::GetFilenamePath(name); - if (sf->SourceName.size() > 0) { + if (!sf->SourceName.empty()) { sf->SourceName += "/"; } sf->SourceName += cmSystemTools::GetFilenameWithoutLastExtension(name); @@ -756,7 +756,7 @@ void CCONV cmSourceFileSetName2(void* arg, const char* name, const char* dir, fname += "."; fname += ext; } - sf->FullPath = cmSystemTools::CollapseFullPath(fname.c_str(), dir); + sf->FullPath = cmSystemTools::CollapseFullPath(fname, dir); cmSystemTools::ConvertToUnixSlashes(sf->FullPath); sf->SourceExtension = ext; } |