fix code to satify value semantic
authorwoo <s-w.woo@samsung.com>
Mon, 25 Mar 2013 10:06:12 +0000 (19:06 +0900)
committerwoo <s-w.woo@samsung.com>
Mon, 25 Mar 2013 10:06:12 +0000 (19:06 +0900)
Change-Id: I238a3760f9cd36b71fd72bda6ea3dbb0cfc92c82
Signed-off-by: woo <s-w.woo@samsung.com>
project/src/BasicAppFrame.cpp
project/src/ButtonPanel.cpp
project/src/MainForm.cpp

index 538974e..4ec1897 100644 (file)
@@ -50,7 +50,7 @@ BasicAppFrame::OnInitializing(void)
        result r = pMainForm->Initialize(__panelId);
 
        // Add the form to the frame
-       AddControl(*pMainForm);
+       AddControl(pMainForm);
 
        // Set the current form
        SetCurrentForm(*pMainForm);
index 48c41ae..064e3d6 100644 (file)
@@ -48,7 +48,7 @@ ButtonPanel::OnInitializing(void)
        __pLabel->SetName(L"Label1");
        __pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
        __pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
-       result r = AddControl(*__pLabel);
+       result r = AddControl(__pLabel);
 
        // Create a Button
        Button *pButton = new (std::nothrow) Button();
@@ -56,7 +56,7 @@ ButtonPanel::OnInitializing(void)
        pButton->SetText(L"Change Text");
        pButton->SetActionId(ID_BUTTON);
        pButton->AddActionEventListener(*this);
-       r = AddControl(*pButton);
+       r = AddControl(pButton);
 
        return r;
 }
index bd2dca6..8fc74be 100644 (file)
@@ -63,10 +63,12 @@ result
 MainForm::CreateImagePanel(void)
 {
        ImagePanel* pImagePanel = new (std::nothrow) ImagePanel();
-       pImagePanel->Initialize(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
+       result r = pImagePanel->Initialize(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));
        AddOrientationEventListener(*pImagePanel);
-       AddControl(*pImagePanel);
+       r = AddControl(pImagePanel);
        __pPanel[2] = pImagePanel;
+
+       return r;
 }
 
 result
@@ -113,7 +115,7 @@ MainForm::OnInitializing(void)
        // Create the Button panel
        ButtonPanel* pButtonPanel = new (std::nothrow) ButtonPanel();
        pButtonPanel->Initialize(rect);
-       AddControl(*pButtonPanel);
+       AddControl(pButtonPanel);
        __pPanel[0] = pButtonPanel;
 
        // Orientation panel was created with UI Builder,