Fixed Coding Idioms Violations
[platform/framework/native/uifw.git] / src / ui / controls / FUiCtrl_ExpandableListImpl.cpp
index bc87959..b110b04 100644 (file)
@@ -712,7 +712,7 @@ _ExpandableListImpl::InsertItemAt(int mainIndex, const CustomListItem& item, int
 
        item.__pCustomListItemImpl->itemId = itemId;
 
-       Boolean* pIsExpanded = new Boolean(false);
+       Boolean* pIsExpanded = new (std::nothrow) Boolean(false);
        SysTryReturn(NID_UI_CTRL, pIsExpanded, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
        __groupExpandStateList.InsertAt(*pIsExpanded, mainIndex);
@@ -1032,7 +1032,7 @@ _ExpandableListImpl::SetItemExpanded(int mainIndex, bool expand)
 {
        SysTryReturnResult(NID_UI_CTRL, (mainIndex >= 0 && mainIndex < GetGroupCount()), E_INVALID_ARG, "Invalid argument used. mainIndex = %d", mainIndex);
 
-       Boolean* pIsExpanded = new Boolean(expand);
+       Boolean* pIsExpanded = new (std::nothrow) Boolean(expand);
        SysTryReturn(NID_UI_CTRL, pIsExpanded, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory allocation failed.");
 
        __groupExpandStateList.SetAt(*pIsExpanded, mainIndex, true);
@@ -1973,7 +1973,7 @@ void
 _ExpandableListImpl::ProcessItemStateChange(int mainIndex, int subIndex, ItemStatus itemStatus)
 {
        int itemId = -1;
-       if (subIndex == -1 )
+       if (subIndex == -1)
        {
                itemId = GetItemIdAt(mainIndex);
        }