Move if condition.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Thu, 28 Mar 2013 10:00:39 +0000 (19:00 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Thu, 28 Mar 2013 10:00:39 +0000 (19:00 +0900)
Change-Id: I44626c2fb217de50312d21e7afff354898c64c1b

src/ui/FUi_Control.cpp

index 4ef5991..f8ef9c3 100755 (executable)
@@ -3518,15 +3518,15 @@ _Control::SetClientBounds(const Rectangle& bounds)
 {
        ClearLastResult();
 
+       const bool moved   = (__clientBounds.x != _CoordinateSystemUtils::ConvertToFloat(bounds).x) || (__clientBounds.y != _CoordinateSystemUtils::ConvertToFloat(bounds).y);
+       const bool resized = (__clientBounds.width != _CoordinateSystemUtils::ConvertToFloat(bounds).width) || (__clientBounds.height != _CoordinateSystemUtils::ConvertToFloat(bounds).height);
+
        SysTryReturn(NID_UI,
                                IsMovable() && IsResizable(), E_UNSUPPORTED_OPERATION,
                                E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable nor resizable.");
        __clientBounds = _CoordinateSystemUtils::ConvertToFloat(bounds);
        __isSetClientBounds = true;
 
-       const bool moved   = (__clientBounds.x != _CoordinateSystemUtils::ConvertToFloat(bounds).x) || (__clientBounds.y != _CoordinateSystemUtils::ConvertToFloat(bounds).y);
-       const bool resized = (__clientBounds.width != _CoordinateSystemUtils::ConvertToFloat(bounds).width) || (__clientBounds.height != _CoordinateSystemUtils::ConvertToFloat(bounds).height);
-
        if (moved || resized)
        {
                result r = AdjustAbsoluteBounds();
@@ -3542,15 +3542,15 @@ _Control::SetClientBounds(const FloatRectangle& bounds)
 {
        ClearLastResult();
 
+       const bool moved   = (__clientBounds.x != bounds.x) || (__clientBounds.y != bounds.y);
+       const bool resized = (__clientBounds.width != bounds.width) || (__clientBounds.height != bounds.height);
+
        SysTryReturn(NID_UI,
                                IsMovable() && IsResizable(), E_UNSUPPORTED_OPERATION,
                                E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] Not movable nor resizable.");
        __clientBounds = bounds;
        __isSetClientBounds = true;
 
-       const bool moved   = (__clientBounds.x != bounds.x) || (__clientBounds.y != bounds.y);
-       const bool resized = (__clientBounds.width != bounds.width) || (__clientBounds.height != bounds.height);
-
        if (moved || resized)
        {
                result r = AdjustAbsoluteBounds();