diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-06-29 13:21:31 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-06-30 18:54:57 +0200 |
commit | 16a5206c78851f80c1f657d3cb51e92fd799e7d4 (patch) | |
tree | 68d2296c1bc8c268730229a4cee5cd6fd9bd101c /src/corelib/io/qloggingregistry.cpp | |
parent | b1ec50c96df0fcfbcf18281ca5d7e1e52dbca5f6 (diff) |
QLoggingRegistry: remove an always true test
idx has already been tested for being >=0, so it's pointless
retesting it.
Change-Id: I2f5d7e1b7a70097de2601c1ed83752f6aa707cd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qloggingregistry.cpp')
-rw-r--r-- | src/corelib/io/qloggingregistry.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/io/qloggingregistry.cpp b/src/corelib/io/qloggingregistry.cpp index e2a866372c..91d3e5a73c 100644 --- a/src/corelib/io/qloggingregistry.cpp +++ b/src/corelib/io/qloggingregistry.cpp @@ -105,8 +105,7 @@ int QLoggingRule::pass(QLatin1String cat, QtMsgType msgType) const if (idx >= 0) { if (flags == MidFilter) { // matches somewhere - if (idx >= 0) - return (enabled ? 1 : -1); + return (enabled ? 1 : -1); } else if (flags == LeftFilter) { // matches left if (idx == 0) |