diff options
author | Michi Henning <michi@zeroc.com> | 2006-11-07 04:29:20 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2006-11-07 04:29:20 +0000 |
commit | 289f67db5e2b35767fd0e925c474ed001b49033f (patch) | |
tree | fb7fd6a34f075c50a5d78475d8a0c67fe4b28bd9 /cpp/src/slice2py/Main.cpp | |
parent | bug 1444: allow test to detect target JDK version (diff) | |
download | ice-289f67db5e2b35767fd0e925c474ed001b49033f.tar.bz2 ice-289f67db5e2b35767fd0e925c474ed001b49033f.tar.xz ice-289f67db5e2b35767fd0e925c474ed001b49033f.zip |
Fixed a few coding style issues.
Diffstat (limited to 'cpp/src/slice2py/Main.cpp')
-rw-r--r-- | cpp/src/slice2py/Main.cpp | 77 |
1 files changed, 32 insertions, 45 deletions
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp index d970dbe5557..c0ecd103ddf 100644 --- a/cpp/src/slice2py/Main.cpp +++ b/cpp/src/slice2py/Main.cpp @@ -384,18 +384,6 @@ usage(const char* n) int main(int argc, char* argv[]) { - string cppArgs; - vector<string> includePaths; - bool preprocess; - string output; - bool debug; - bool ice; - bool all; - bool noPackage; - bool checksum; - bool caseSensitive; - string prefix; - IceUtil::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); @@ -429,50 +417,49 @@ main(int argc, char* argv[]) usage(argv[0]); return EXIT_SUCCESS; } + if(opts.isSet("version")) { cout << ICE_STRING_VERSION << endl; return EXIT_SUCCESS; } - if(opts.isSet("D")) - { - vector<string> optargs = opts.argVec("D"); - for(vector<string>::const_iterator i = optargs.begin(); i != optargs.end(); ++i) - { - cppArgs += " -D\"" + *i + "\""; - } - } - if(opts.isSet("U")) - { - vector<string> optargs = opts.argVec("U"); - for(vector<string>::const_iterator i = optargs.begin(); i != optargs.end(); ++i) - { - cppArgs += " -U\"" + *i + "\""; - } - } - if(opts.isSet("I")) + + string cppArgs; + vector<string> optargs = opts.argVec("D"); + for(vector<string>::const_iterator i = optargs.begin(); i != optargs.end(); ++i) { - includePaths = opts.argVec("I"); - for(vector<string>::const_iterator i = includePaths.begin(); i != includePaths.end(); ++i) - { - cppArgs += " -I\"" + *i + "\""; - } + cppArgs += " -D\"" + *i + "\""; } - preprocess = opts.isSet("E"); - if(opts.isSet("output-dir")) + + optargs = opts.argVec("U"); + for(vector<string>::const_iterator i = optargs.begin(); i != optargs.end(); ++i) { - output = opts.optArg("output-dir"); + cppArgs += " -U\"" + *i + "\""; } - debug = opts.isSet("debug"); - ice = opts.isSet("ice"); - all = opts.isSet("all"); - noPackage = opts.isSet("no-package"); - checksum = opts.isSet("checksum"); - if(opts.isSet("prefix")) + + vector<string> includePaths = opts.argVec("I"); + for(vector<string>::const_iterator i = includePaths.begin(); i != includePaths.end(); ++i) { - prefix = opts.optArg("prefix"); + cppArgs += " -I\"" + *i + "\""; } - caseSensitive = opts.isSet("case-sensitive"); + + bool preprocess = opts.isSet("E"); + + string output = opts.optArg("output-dir"); + + bool debug = opts.isSet("debug"); + + bool ice = opts.isSet("ice"); + + bool all = opts.isSet("all"); + + bool noPackage = opts.isSet("no-package"); + + bool checksum = opts.isSet("checksum"); + + string prefix = opts.optArg("prefix"); + + bool caseSensitive = opts.isSet("case-sensitive"); if(args.empty()) { |