Fix the misused argument for collection.
[platform/framework/native/appfw.git] / src / locales / FLcl_DateTimeSymbolsImpl.cpp
index 7e6cb01..319576c 100644 (file)
@@ -441,7 +441,7 @@ _DateTimeSymbolsImpl::CloneArrayListN(const IList* pList) const
                std::unique_ptr< String > pClonedString(new (std::nothrow) String(*(static_cast<const String*>(pList->GetAt(i)))));
                SysTryReturn(NID_LCL, pClonedString, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed", GetErrorMessage(E_OUT_OF_MEMORY));
 
-               r = pClonedArrayList->Add(*pClonedString);
+               r = pClonedArrayList->Add(pClonedString.get());
                SysTryReturn(NID_LCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed", GetErrorMessage(E_OUT_OF_MEMORY));
 
                pClonedString.release();
@@ -486,7 +486,7 @@ _DateTimeSymbolsImpl::CloneMultiHashMapN(const Tizen::Base::Collection::IMultiMa
                        std::unique_ptr< String > pTimeZoneName(new (std::nothrow) String(*(static_cast<String*> (pValueEnum->GetCurrent()))));
                        if (pTimeZoneName)
                        {
-                               r = pClonedMultiHashMap->Add(*pMapKey, *pTimeZoneName);
+                               r = pClonedMultiHashMap->Add(pMapKey.get(), pTimeZoneName.get());
                                if (IsFailed(r))
                                {
                                        pClonedMultiHashMap->Remove(*pMapKey,true);
@@ -529,7 +529,7 @@ _DateTimeSymbolsImpl::SetList(Tizen::Base::Collection::ArrayList* pArrayList, in
                        pListStr.reset(new (std::nothrow) String(token));
                        SysTryReturnResult(NID_LCL, pListStr, E_OUT_OF_MEMORY, "Memory allocation failed.");
 
-                       r = pTmpArrayList->Add(*pListStr);
+                       r = pTmpArrayList->Add(pListStr.get());
                        SysTryReturnResult(NID_LCL, r == E_SUCCESS, r, "Failed to add value to array list.");
 
                        pListStr.release();