diff options
author | Marius Kintel <marius@kintel.net> | 2012-08-22 01:06:56 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-08-22 01:06:56 (GMT) |
commit | 7bca8b414b84dcd4bcb3ab55b01969df5300d363 (patch) | |
tree | ddf5320291b6c23feffa37e78f050e7f3e9f8a40 | |
parent | a629560cee963087f6e43019d37933ce60776e49 (diff) |
minor code compacting
-rw-r--r-- | src/openscad.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/openscad.cc b/src/openscad.cc index f508b80..49c39da 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -58,6 +58,7 @@ #include <boost/program_options.hpp> #include <boost/filesystem.hpp> +#include <boost/foreach.hpp> #include "boosty.h" #ifdef _MSC_VER @@ -187,10 +188,8 @@ int main(int argc, char **argv) } if (vm.count("D")) { - const vector<string> &commands = vm["D"].as<vector<string> >(); - - for (vector<string>::const_iterator i = commands.begin(); i != commands.end(); i++) { - commandline_commands += *i; + BOOST_FOREACH(const string &cmd, vm["D"].as<vector<string> >()) { + commandline_commands += cmd; commandline_commands += ";\n"; } } |