GIFTranslator: Combine nested if statements

...into single conditional
This commit is contained in:
John Scipione 2014-03-05 20:31:03 -05:00
parent 78bfaa98e1
commit 9d41bc18bb

View File

@ -337,10 +337,9 @@ GIFView::MessageReceived(BMessage* message)
if (fColorCountMF->IsEnabled()) {
int32 sizeInBits;
if (message->FindInt32(GIF_SETTING_PALETTE_SIZE, &sizeInBits)
>= B_OK) {
if (sizeInBits > 0 && sizeInBits <= 8)
fSettings->SetGetInt32(GIF_SETTING_PALETTE_SIZE,
&sizeInBits);
>= B_OK && sizeInBits > 0 && sizeInBits <= 8) {
fSettings->SetGetInt32(GIF_SETTING_PALETTE_SIZE,
&sizeInBits);
}
}
break;