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/slice2rb/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/slice2rb/Main.cpp')
-rw-r--r-- | cpp/src/slice2rb/Main.cpp | 66 |
1 files changed, 28 insertions, 38 deletions
diff --git a/cpp/src/slice2rb/Main.cpp b/cpp/src/slice2rb/Main.cpp index b83d228a5a0..fdf2d4c4ae9 100644 --- a/cpp/src/slice2rb/Main.cpp +++ b/cpp/src/slice2rb/Main.cpp @@ -54,16 +54,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 checksum; - bool caseSensitive; - IceUtil::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); @@ -95,45 +85,45 @@ 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")) + + string cppArgs; + vector<string> optargs = opts.argVec("D"); + for(vector<string>::const_iterator i = optargs.begin(); i != optargs.end(); ++i) { - vector<string> optargs = opts.argVec("U"); - for(vector<string>::const_iterator i = optargs.begin(); i != optargs.end(); ++i) - { - cppArgs += " -U" + *i; - } + cppArgs += " -D" + *i; } - if(opts.isSet("I")) + + optargs = opts.argVec("U"); + 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 += " -U" + *i; } - preprocess = opts.isSet("E"); - if(opts.isSet("output-dir")) + + vector<string> includePaths = opts.argVec("I"); + for(vector<string>::const_iterator i = includePaths.begin(); i != includePaths.end(); ++i) { - output = opts.optArg("output-dir"); + cppArgs += " -I" + *i; } - debug = opts.isSet("debug"); - ice = opts.isSet("ice"); - all = opts.isSet("all"); - checksum = opts.isSet("checksum"); - 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 checksum = opts.isSet("checksum"); + + bool caseSensitive = opts.isSet("case-sensitive"); if(args.empty()) { |