From 209e6a889af3ad89f65246ad7ce6cb9a53bd418d Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 2 Nov 2018 14:35:35 +0800 Subject: [PATCH] Fix MSVC warning C4804 Full message of the warning: webui\api\searchcontroller.cpp(54): warning C4804: '>': unsafe use of type 'bool' in operation --- src/webui/api/searchcontroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/api/searchcontroller.cpp b/src/webui/api/searchcontroller.cpp index 57b379576..015d08467 100644 --- a/src/webui/api/searchcontroller.cpp +++ b/src/webui/api/searchcontroller.cpp @@ -51,7 +51,7 @@ namespace void removeActiveSearch(ISession *session, const int id) { auto activeSearches = session->getData>(ACTIVE_SEARCHES); - if (activeSearches.remove(id) > 0) + if (activeSearches.remove(id)) session->setData(ACTIVE_SEARCHES, QVariant::fromValue(activeSearches)); } }