Remove unused pbOpt parameter

Change-Id: I4c566a122d600d41d7d8049779628a08e68ca277
This commit is contained in:
Stephan Bergmann 2016-05-02 16:59:51 +02:00
parent 5df086e79f
commit b14c3a5e33
3 changed files with 18 additions and 20 deletions

View File

@ -32,7 +32,7 @@ bool readOption( OUString * pValue, const sal_Char * pOpt,
// throws CannotDumpException // throws CannotDumpException
bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt, bool readOption( const sal_Char * pOpt,
sal_uInt32 * pnIndex, const OUString & aArg); sal_uInt32 * pnIndex, const OUString & aArg);
} // end of namespace unodevtools } // end of namespace unodevtools

View File

@ -138,7 +138,6 @@ SAL_IMPLEMENT_MAIN()
sal_uInt32 nPos = 0; sal_uInt32 nPos = 0;
OUString arg, sOption; OUString arg, sOption;
sal_Bool bOption=false;
// check command // check command
rtl_getAppCommandArg(nPos++, &arg.pData); rtl_getAppCommandArg(nPos++, &arg.pData);
@ -155,12 +154,12 @@ SAL_IMPLEMENT_MAIN()
options.dump = false; options.dump = false;
options.shortnames = true; options.shortnames = true;
options.componenttype = 3; options.componenttype = 3;
} else if ( readOption( &bOption, "h", &nPos, arg) || } else if ( readOption( "h", &nPos, arg) ||
readOption( &bOption, "help", &nPos, arg) ) { readOption( "help", &nPos, arg) ) {
printUsageAndExit(programname, version); printUsageAndExit(programname, version);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
} else if ( readOption( &bOption, "V", &nPos, arg) || } else if ( readOption( "V", &nPos, arg) ||
readOption( &bOption, "version", &nPos, arg) ) { readOption( "version", &nPos, arg) ) {
std::cerr << "\n Sun Microsystems (R) " << programname std::cerr << "\n Sun Microsystems (R) " << programname
<< " Version " << version << "\n\n"; << " Version " << version << "\n\n";
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
@ -178,39 +177,39 @@ SAL_IMPLEMENT_MAIN()
{ {
rtl_getAppCommandArg(nPos, &arg.pData); rtl_getAppCommandArg(nPos, &arg.pData);
if ( readOption( &bOption, "a", &nPos, arg) || if ( readOption( "a", &nPos, arg) ||
readOption( &bOption, "all", &nPos, arg) ) { readOption( "all", &nPos, arg) ) {
options.all = true; options.all = true;
continue; continue;
} }
if ( readOption( &bOption, "java4", &nPos, arg) ) { if ( readOption( "java4", &nPos, arg) ) {
std::cerr << std::cerr <<
"\nError: Java 1.4 is no longer supported, use --java5 instead\n"; "\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; options.language = 1;
continue; continue;
} }
if ( readOption( &bOption, "cpp", &nPos, arg) ) { if ( readOption( "cpp", &nPos, arg) ) {
options.language = 2; options.language = 2;
continue; continue;
} }
if ( readOption( &bOption, "sn", &nPos, arg) || if ( readOption( "sn", &nPos, arg) ||
readOption( &bOption, "shortnames", &nPos, arg) ) { readOption( "shortnames", &nPos, arg) ) {
options.shortnames = true; options.shortnames = true;
continue; continue;
} }
if ( readOption( &bOption, "lh", &nPos, arg) || if ( readOption( "lh", &nPos, arg) ||
readOption( &bOption, "licenseheader", &nPos, arg) ) { readOption( "licenseheader", &nPos, arg) ) {
options.license = true; options.license = true;
continue; continue;
} }
if ( readOption( &bOption, "bc", &nPos, arg) || if ( readOption( "bc", &nPos, arg) ||
readOption( &bOption, "backward-compatible", &nPos, arg) ) { readOption( "backward-compatible", &nPos, arg) ) {
options.backwardcompatible = true; options.backwardcompatible = true;
continue; continue;
} }
if ( readOption( &bOption, "propertysetmixin", &nPos, arg) ) { if ( readOption( "propertysetmixin", &nPos, arg) ) {
options.supportpropertysetmixin = true; options.supportpropertysetmixin = true;
continue; continue;
} }

View File

@ -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) sal_uInt32 * pnIndex, const OUString & aArg)
{ {
OUString aOpt = OUString::createFromAscii(pOpt); 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))) ) (aArg.startsWith("--") && aOpt.equalsIgnoreAsciiCase(aArg.copy(2))) )
{ {
++(*pnIndex); ++(*pnIndex);
*pbOpt = true;
SAL_INFO("unodevtools", "identified option --" << pOpt); SAL_INFO("unodevtools", "identified option --" << pOpt);
return true; return true;
} }