From b14c3a5e330263c2e735deb59e44236ce205894c Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 2 May 2016 16:59:51 +0200 Subject: Remove unused pbOpt parameter Change-Id: I4c566a122d600d41d7d8049779628a08e68ca277 --- unodevtools/inc/unodevtools/options.hxx | 2 +- unodevtools/source/skeletonmaker/skeletonmaker.cxx | 33 +++++++++++----------- unodevtools/source/unodevtools/options.cxx | 3 +- 3 files changed, 18 insertions(+), 20 deletions(-) (limited to 'unodevtools') diff --git a/unodevtools/inc/unodevtools/options.hxx b/unodevtools/inc/unodevtools/options.hxx index 0455cd9ff171..566c18d01f1c 100644 --- a/unodevtools/inc/unodevtools/options.hxx +++ b/unodevtools/inc/unodevtools/options.hxx @@ -32,7 +32,7 @@ bool readOption( OUString * pValue, const sal_Char * pOpt, // throws CannotDumpException -bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, +bool readOption( const sal_Char * pOpt, sal_uInt32 * pnIndex, const OUString & aArg); } // end of namespace unodevtools diff --git a/unodevtools/source/skeletonmaker/skeletonmaker.cxx b/unodevtools/source/skeletonmaker/skeletonmaker.cxx index fcca636b5e30..c193df6de267 100644 --- a/unodevtools/source/skeletonmaker/skeletonmaker.cxx +++ b/unodevtools/source/skeletonmaker/skeletonmaker.cxx @@ -138,7 +138,6 @@ SAL_IMPLEMENT_MAIN() sal_uInt32 nPos = 0; OUString arg, sOption; - sal_Bool bOption=false; // check command rtl_getAppCommandArg(nPos++, &arg.pData); @@ -155,12 +154,12 @@ SAL_IMPLEMENT_MAIN() options.dump = false; options.shortnames = true; options.componenttype = 3; - } else if ( readOption( &bOption, "h", &nPos, arg) || - readOption( &bOption, "help", &nPos, arg) ) { + } else if ( readOption( "h", &nPos, arg) || + readOption( "help", &nPos, arg) ) { printUsageAndExit(programname, version); exit(EXIT_SUCCESS); - } else if ( readOption( &bOption, "V", &nPos, arg) || - readOption( &bOption, "version", &nPos, arg) ) { + } else if ( readOption( "V", &nPos, arg) || + readOption( "version", &nPos, arg) ) { std::cerr << "\n Sun Microsystems (R) " << programname << " Version " << version << "\n\n"; exit(EXIT_SUCCESS); @@ -178,39 +177,39 @@ SAL_IMPLEMENT_MAIN() { rtl_getAppCommandArg(nPos, &arg.pData); - if ( readOption( &bOption, "a", &nPos, arg) || - readOption( &bOption, "all", &nPos, arg) ) { + if ( readOption( "a", &nPos, arg) || + readOption( "all", &nPos, arg) ) { options.all = true; continue; } - if ( readOption( &bOption, "java4", &nPos, arg) ) { + if ( readOption( "java4", &nPos, arg) ) { std::cerr << "\nError: Java 1.4 is no longer supported, use --java5 instead\n"; } - if ( readOption( &bOption, "java5", &nPos, arg) ) { + if ( readOption( "java5", &nPos, arg) ) { options.language = 1; continue; } - if ( readOption( &bOption, "cpp", &nPos, arg) ) { + if ( readOption( "cpp", &nPos, arg) ) { options.language = 2; continue; } - if ( readOption( &bOption, "sn", &nPos, arg) || - readOption( &bOption, "shortnames", &nPos, arg) ) { + if ( readOption( "sn", &nPos, arg) || + readOption( "shortnames", &nPos, arg) ) { options.shortnames = true; continue; } - if ( readOption( &bOption, "lh", &nPos, arg) || - readOption( &bOption, "licenseheader", &nPos, arg) ) { + if ( readOption( "lh", &nPos, arg) || + readOption( "licenseheader", &nPos, arg) ) { options.license = true; continue; } - if ( readOption( &bOption, "bc", &nPos, arg) || - readOption( &bOption, "backward-compatible", &nPos, arg) ) { + if ( readOption( "bc", &nPos, arg) || + readOption( "backward-compatible", &nPos, arg) ) { options.backwardcompatible = true; continue; } - if ( readOption( &bOption, "propertysetmixin", &nPos, arg) ) { + if ( readOption( "propertysetmixin", &nPos, arg) ) { options.supportpropertysetmixin = true; continue; } diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx index d3302bb2c3f1..6022e5c29669 100644 --- a/unodevtools/source/unodevtools/options.cxx +++ b/unodevtools/source/unodevtools/options.cxx @@ -65,7 +65,7 @@ bool readOption( OUString * pValue, const sal_Char * pOpt, } -bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, +bool readOption( const sal_Char * pOpt, sal_uInt32 * pnIndex, const OUString & aArg) { OUString aOpt = OUString::createFromAscii(pOpt); @@ -74,7 +74,6 @@ bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, (aArg.startsWith("--") && aOpt.equalsIgnoreAsciiCase(aArg.copy(2))) ) { ++(*pnIndex); - *pbOpt = true; SAL_INFO("unodevtools", "identified option --" << pOpt); return true; } -- cgit