QLibrary: remove dead check

The variable `i` is initially `suffixPos + 1` and is then incremented
further. It therefore can never be equal to `suffixPos` (ints don't
overflow, that would be UB, and suffixPos doesn't change its value),
so don't check for that.

Change-Id: I3870ddf6ee550cad6c24fececf2a0b662a33d750
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2021-08-12 15:09:26 +02:00
parent 175e81ffbd
commit d3ece0fcc2
1 changed files with 1 additions and 2 deletions

View File

@ -707,8 +707,7 @@ bool QLibrary::isLibrary(const QString &fileName)
bool valid = suffixPos != -1;
for (int i = suffixPos + 1; i < suffixes.count() && valid; ++i)
if (i != suffixPos)
(void)suffixes.at(i).toInt(&valid);
(void)suffixes.at(i).toInt(&valid);
return valid;
#endif
}