diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-23 14:17:39 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-23 15:07:49 (GMT) |
commit | aaf59120bfd77a960317923da30e1a70ce0d8aae (patch) | |
tree | 9fba0f2e6c0157887ccf0848c3357dae58edee0a /Source/cmExtraEclipseCDT4Generator.cxx | |
parent | 19612dffd27d90d73e3b7cff9cbba241294c17e9 (diff) | |
download | CMake-aaf59120bfd77a960317923da30e1a70ce0d8aae.zip CMake-aaf59120bfd77a960317923da30e1a70ce0d8aae.tar.gz CMake-aaf59120bfd77a960317923da30e1a70ce0d8aae.tar.bz2 |
Source sweep: Replace cmExpandList with the shorter cmExpandedList
This replaces the code pattern
```
std::vector<std::string> args;
cmExpandList(valueStr, args, ...)
```
with
```
std::vector<std::string> args = cmExpandedList(valueStr, ...)
```
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 5ff638d..6c94aae 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -415,8 +415,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() if (const char* extraNaturesProp = mf->GetState()->GetGlobalProperty("ECLIPSE_EXTRA_NATURES")) { - std::vector<std::string> extraNatures; - cmExpandList(extraNaturesProp, extraNatures); + std::vector<std::string> extraNatures = cmExpandedList(extraNaturesProp); for (std::string const& n : extraNatures) { xml.Element("nature", n); } @@ -797,8 +796,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const mf->GetDefinition("CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS"); if (this->CEnabled && cDefs) { // Expand the list. - std::vector<std::string> defs; - cmExpandList(cDefs, defs, true); + std::vector<std::string> defs = cmExpandedList(cDefs, true); // the list must contain only definition-value pairs: if ((defs.size() % 2) == 0) { @@ -830,8 +828,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const mf->GetDefinition("CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS"); if (this->CXXEnabled && cxxDefs) { // Expand the list. - std::vector<std::string> defs; - cmExpandList(cxxDefs, defs, true); + std::vector<std::string> defs = cmExpandedList(cxxDefs, true); // the list must contain only definition-value pairs: if ((defs.size() % 2) == 0) { @@ -881,16 +878,14 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const if (this->CEnabled && !compiler.empty()) { std::string systemIncludeDirs = mf->GetSafeDefinition("CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS"); - std::vector<std::string> dirs; - cmExpandList(systemIncludeDirs, dirs); + std::vector<std::string> dirs = cmExpandedList(systemIncludeDirs); this->AppendIncludeDirectories(xml, dirs, emmited); } compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER"); if (this->CXXEnabled && !compiler.empty()) { std::string systemIncludeDirs = mf->GetSafeDefinition("CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS"); - std::vector<std::string> dirs; - cmExpandList(systemIncludeDirs, dirs); + std::vector<std::string> dirs = cmExpandedList(systemIncludeDirs); this->AppendIncludeDirectories(xml, dirs, emmited); } |