Simplified the code, style improvement (brackets for multi-line if/else).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28674 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -543,17 +543,15 @@ BaseTranslator::BitsTranslate(BPositionIO *inSource,
|
|||||||
const translator_info *inInfo, BMessage *ioExtension, uint32 outType,
|
const translator_info *inInfo, BMessage *ioExtension, uint32 outType,
|
||||||
BPositionIO *outDestination)
|
BPositionIO *outDestination)
|
||||||
{
|
{
|
||||||
status_t result;
|
status_t result = BitsCheck(inSource, ioExtension, outType);
|
||||||
|
if (result == B_OK && outType == B_TRANSLATOR_BITMAP) {
|
||||||
result = BitsCheck(inSource, ioExtension, outType);
|
|
||||||
if (result == B_OK && outType == B_TRANSLATOR_BITMAP)
|
|
||||||
result = translate_from_bits_to_bits(inSource, outType,
|
result = translate_from_bits_to_bits(inSource, outType,
|
||||||
outDestination);
|
outDestination);
|
||||||
else if (result >= B_OK)
|
} else if (result >= B_OK) {
|
||||||
// If NOT B_TRANSLATOR_BITMAP type it could be the derived format
|
// If NOT B_TRANSLATOR_BITMAP type it could be the derived format
|
||||||
result = DerivedTranslate(inSource, inInfo, ioExtension, outType,
|
result = DerivedTranslate(inSource, inInfo, ioExtension, outType,
|
||||||
outDestination, (result == B_OK));
|
outDestination, (result == B_OK));
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user