From 96c30cc820dc6031e85e264dcad55fc1a2caea52 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Mon, 3 Sep 2012 16:53:53 -0400 Subject: [PATCH] Tracker: fix warning in gcc2 Refactor a bit the conditions to avoid a warning. --- src/kits/tracker/Model.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/kits/tracker/Model.cpp b/src/kits/tracker/Model.cpp index e4607ad5a6..7c5e617569 100644 --- a/src/kits/tracker/Model.cpp +++ b/src/kits/tracker/Model.cpp @@ -1106,14 +1106,12 @@ Model::SupportsMimeType(const char* type, const BObjectList* list, int32 match; - if (type) { + if (type || (list != NULL && list->IsEmpty())) { BString typeString(type); match = MatchMimeTypeString(&typeString, mimeSignature); } else { - if (list != NULL && !list->IsEmpty()) { - match = WhileEachListItem(const_cast*>(list), - MatchMimeTypeString, mimeSignature); - } + match = WhileEachListItem(const_cast*>(list), + MatchMimeTypeString, mimeSignature); // const_cast shouldnt be here, have to have it until // MW cleans up }