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 committed by Ryan Leavengood
parent 6ba553e7b4
commit 7d0e707aef

View File

@ -1106,14 +1106,12 @@ Model::SupportsMimeType(const char* type, const BObjectList<BString>* 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<BObjectList<BString>*>(list),
MatchMimeTypeString, mimeSignature);
}
match = WhileEachListItem(const_cast<BObjectList<BString>*>(list),
MatchMimeTypeString, mimeSignature);
// const_cast shouldnt be here, have to have it until
// MW cleans up
}