Bug 1179451 - Part 1: Rewrite some ternary operators as if/else. r=froydnj

This commit is contained in:
Aryeh Gregor
2015-08-13 15:22:48 +03:00
parent 6c5d0d5488
commit c1bd5a2ced
15 changed files with 71 additions and 18 deletions

View File

@@ -175,7 +175,11 @@ nsPluginArray::IndexedGetter(uint32_t aIndex, bool &aFound)
aFound = aIndex < mPlugins.Length();
return aFound ? mPlugins[aIndex] : nullptr;
if (!aFound) {
return nullptr;
}
return mPlugins[aIndex];
}
void
@@ -391,7 +395,11 @@ nsPluginElement::IndexedGetter(uint32_t aIndex, bool &aFound)
aFound = aIndex < mMimeTypes.Length();
return aFound ? mMimeTypes[aIndex] : nullptr;
if (!aFound) {
return nullptr;
}
return mMimeTypes[aIndex];
}
nsMimeType*