From 16a5206c78851f80c1f657d3cb51e92fd799e7d4 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Mon, 29 Jun 2020 13:21:31 +0200 Subject: 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 --- src/corelib/io/qloggingregistry.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/corelib/io/qloggingregistry.cpp') 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) -- cgit v1.2.3