Fix for Redundant If Statement
authorShiv Pratap Singh <shivp.singh@samsung.com>
Wed, 30 Oct 2013 05:45:22 +0000 (11:15 +0530)
committerShiv Pratap Singh <shivp.singh@samsung.com>
Wed, 30 Oct 2013 05:45:22 +0000 (11:15 +0530)
Change-Id: Id05edcf0123cbb197e25168e65189a0702cc1659
Signed-off-by: Shiv Pratap Singh <shivp.singh@samsung.com>
src/ui/controls/FUiCtrl_DateTimeDisplayBox.cpp

index 45ebc0c..fe6552d 100644 (file)
@@ -176,21 +176,18 @@ _DateTimeDisplayBox::DrawBackground(Canvas& canvas, DateTimePickerStatus status)
                isCustomBitmap[i] = false;
        }
 
-       if (__pBackgroundNormalBitmap[status] != null)
+       if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status]))
        {
-               if (_BitmapImpl::CheckNinePatchedBitmapStrictly(*__pBackgroundNormalBitmap[status]))
-               {
-                       r = canvas.DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height), *__pBackgroundNormalBitmap[status]);
-                       SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
-               }
-               else
-               {
-                       FloatPoint position(0.0f, 0.0f);
-                       position.x = (__windowBounds.width - __pBackgroundNormalBitmap[status]->GetWidthF()) / 2;
-                       position.y = (__windowBounds.height - __pBackgroundNormalBitmap[status]->GetHeightF()) / 2;
-                       r = canvas.DrawBitmap(position, *__pBackgroundNormalBitmap[status]);
-                       SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
-               }
+               r = canvas.DrawNinePatchedBitmap(FloatRectangle(0.0f, 0.0f, __windowBounds.width, __windowBounds.height), *__pBackgroundNormalBitmap[status]);
+               SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
+       }
+       else
+       {
+               FloatPoint position(0.0f, 0.0f);
+               position.x = (__windowBounds.width - __pBackgroundNormalBitmap[status]->GetWidthF()) / 2;
+               position.y = (__windowBounds.height - __pBackgroundNormalBitmap[status]->GetHeightF()) / 2;
+               r = canvas.DrawBitmap(position, *__pBackgroundNormalBitmap[status]);
+               SysTryReturnVoidResult(NID_UI_CTRL, (r == E_SUCCESS), r, "[%s] Propagating.", GetErrorMessage(r));
        }
 
        if (__boxId == DATETIME_ID_AMPM)