diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-27 08:46:58 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-02 10:29:33 (GMT) |
commit | 936e00b92c9afe2be6b91d65166ade8ec1e06f48 (patch) | |
tree | e574b3da43593cc61bcc5f9c6430658cfebf849f /Source/cmExportCommand.cxx | |
parent | 358be9b3207ad92a7ce4a5744db6a7265d8a0844 (diff) | |
download | CMake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.zip CMake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.tar.gz CMake-936e00b92c9afe2be6b91d65166ade8ec1e06f48.tar.bz2 |
Simplify multiple config handling.
Use conventional pattern of not repeating the loop body for empty
config.
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r-- | Source/cmExportCommand.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index dcb77ba..2536ada 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -223,18 +223,15 @@ bool cmExportCommand // Compute the set of configurations exported. std::vector<std::string> configurationTypes; this->Makefile->GetConfigurations(configurationTypes); - if(!configurationTypes.empty()) + if(configurationTypes.empty()) { - for(std::vector<std::string>::const_iterator - ci = configurationTypes.begin(); - ci != configurationTypes.end(); ++ci) - { - ebfg->AddConfiguration(*ci); - } + configurationTypes.push_back(""); } - else + for(std::vector<std::string>::const_iterator + ci = configurationTypes.begin(); + ci != configurationTypes.end(); ++ci) { - ebfg->AddConfiguration(""); + ebfg->AddConfiguration(*ci); } if (this->ExportSet) { |