diff options
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r-- | Source/cmCPluginAPI.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 1d9621c..8ed43f9 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -181,7 +181,7 @@ void CCONV cmAddExecutable(void* arg, const char* exename, int numSrcs, std::vector<std::string> srcs2; int i; for (i = 0; i < numSrcs; ++i) { - srcs2.push_back(srcs[i]); + srcs2.emplace_back(srcs[i]); } cmTarget* tg = mf->AddExecutable(exename, srcs2); if (win32) { @@ -347,7 +347,7 @@ static void addLinkLibrary(cmMakefile* mf, std::string const& target, std::ostringstream e; e << "Attempt to add link library \"" << lib << "\" to target \"" << target << "\" which is not built in this directory."; - mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); return; } @@ -362,7 +362,7 @@ static void addLinkLibrary(cmMakefile* mf, std::string const& target, << " may not be linked into another target. " << "One may link only to STATIC or SHARED libraries, or " << "to executables with the ENABLE_EXPORTS property set."; - mf->IssueMessage(cmake::FATAL_ERROR, e.str()); + mf->IssueMessage(MessageType::FATAL_ERROR, e.str()); } t->AddLinkLibrary(*mf, lib, llt); @@ -393,7 +393,7 @@ void CCONV cmAddLibrary(void* arg, const char* libname, int shared, std::vector<std::string> srcs2; int i; for (i = 0; i < numSrcs; ++i) { - srcs2.push_back(srcs[i]); + srcs2.emplace_back(srcs[i]); } mf->AddLibrary( libname, @@ -419,8 +419,7 @@ int CCONV cmExecuteCommand(void* arg, const char* name, int numArgs, lff.Name = name; for (int i = 0; i < numArgs; ++i) { // Assume all arguments are quoted. - lff.Arguments.push_back( - cmListFileArgument(args[i], cmListFileArgument::Quoted, 0)); + lff.Arguments.emplace_back(args[i], cmListFileArgument::Quoted, 0); } cmExecutionStatus status; return mf->ExecuteCommand(lff, status); @@ -436,7 +435,7 @@ void CCONV cmExpandSourceListArguments(void* arg, int numArgs, std::vector<std::string> result; int i; for (i = 0; i < numArgs; ++i) { - result.push_back(args[i]); + result.emplace_back(args[i]); } int resargc = static_cast<int>(result.size()); char** resargv = nullptr; @@ -627,7 +626,7 @@ void CCONV cmSourceFileAddDepend(void* arg, const char* depend) if (cmSourceFile* rsf = sf->RealSourceFile) { rsf->AddDepend(depend); } else { - sf->Depends.push_back(depend); + sf->Depends.emplace_back(depend); } } @@ -647,10 +646,10 @@ void CCONV cmSourceFileSetName(void* arg, const char* name, const char* dir, std::vector<std::string> headerExts; int i; for (i = 0; i < numSourceExtensions; ++i) { - sourceExts.push_back(sourceExtensions[i]); + sourceExts.emplace_back(sourceExtensions[i]); } for (i = 0; i < numHeaderExtensions; ++i) { - headerExts.push_back(headerExtensions[i]); + headerExts.emplace_back(headerExtensions[i]); } // Save the original name given. |