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/slice2cs/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/slice2cs/Main.cpp')
-rw-r--r-- | cpp/src/slice2cs/Main.cpp | 82 |
1 files changed, 36 insertions, 46 deletions
diff --git a/cpp/src/slice2cs/Main.cpp b/cpp/src/slice2cs/Main.cpp index 701d0ecfc19..f096462a198 100644 --- a/cpp/src/slice2cs/Main.cpp +++ b/cpp/src/slice2cs/Main.cpp @@ -43,20 +43,6 @@ usage(const char* n) int main(int argc, char* argv[]) { - string cppArgs; - vector<string> includePaths; - bool preprocess; - string output; - bool tie; - bool impl; - bool implTie; - bool depend; - bool debug; - bool ice; - bool checksum; - bool stream; - bool caseSensitive; - IceUtil::Options opts; opts.addOpt("h", "help"); opts.addOpt("v", "version"); @@ -92,49 +78,53 @@ 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 + "\""; } - tie = opts.isSet("tie"); - impl = opts.isSet("impl"); - implTie = opts.isSet("impl-tie"); - depend = opts.isSet("depend"); - debug = opts.isSet("debug"); - ice = opts.isSet("ice"); - checksum = opts.isSet("checksum"); - stream = opts.isSet("stream"); - caseSensitive = opts.isSet("case-sensitive"); + + bool preprocess = opts.isSet("E"); + + string output = opts.optArg("output-dir"); + + bool tie = opts.isSet("tie"); + + bool impl = opts.isSet("impl"); + + bool implTie = opts.isSet("impl-tie"); + + bool depend = opts.isSet("depend"); + + bool debug = opts.isSet("debug"); + + bool ice = opts.isSet("ice"); + + bool checksum = opts.isSet("checksum"); + + bool stream = opts.isSet("stream"); + + bool caseSensitive = opts.isSet("case-sensitive"); if(args.empty()) { |