Tracker: fix warning in gcc2

Refactor a bit the conditions to avoid a warning.
This commit is contained in:
Philippe Saint-Pierre 2012-09-03 16:53:53 -04:00
parent 139ee87903
commit 96c30cc820

View File

@ -1106,14 +1106,12 @@ Model::SupportsMimeType(const char* type, const BObjectList<BString>* list,
int32 match; int32 match;
if (type) { if (type || (list != NULL && list->IsEmpty())) {
BString typeString(type); BString typeString(type);
match = MatchMimeTypeString(&typeString, mimeSignature); match = MatchMimeTypeString(&typeString, mimeSignature);
} else { } else {
if (list != NULL && !list->IsEmpty()) { match = WhileEachListItem(const_cast<BObjectList<BString>*>(list),
match = WhileEachListItem(const_cast<BObjectList<BString>*>(list), MatchMimeTypeString, mimeSignature);
MatchMimeTypeString, mimeSignature);
}
// const_cast shouldnt be here, have to have it until // const_cast shouldnt be here, have to have it until
// MW cleans up // MW cleans up
} }