From aa51774e6a309f277e71ca3a3b9d5d5b4b3dbf1a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 15 Feb 2019 12:56:52 +0200 Subject: loplugin:simplifybool, check for !(!a op !b) Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin --- idlc/source/options.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'idlc') diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index 04db926dad0d..4f49cd202de4 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -227,7 +227,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) { case 'O': { - if (!((++first != last) && ((*first)[0] != '-'))) + if ((++first == last) || ((*first)[0] == '-')) { return badOption("invalid", option); } @@ -237,7 +237,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) } case 'M': { - if (!((++first != last) && ((*first)[0] != '-'))) + if ((++first == last) || ((*first)[0] == '-')) { return badOption("invalid", option); } @@ -247,7 +247,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) } case 'I': { - if (!((++first != last) && ((*first)[0] != '-'))) + if ((++first == last) || ((*first)[0] == '-')) { return badOption("invalid", option); } @@ -283,7 +283,7 @@ bool Options::initOptions(std::vector< std::string > & rArgs) } case 'D': { - if (!((++first != last) && ((*first)[0] != '-'))) + if ((++first == last) || ((*first)[0] == '-')) { return badOption("invalid", option); } -- cgit