Revert " Manage when the string length is zero"
authorDahyeong Kim <dahyeong.kim@tizendev.org>
Thu, 18 Apr 2013 10:45:17 +0000 (19:45 +0900)
committerGerrit Code Review <gerrit2@kim11>
Thu, 18 Apr 2013 10:45:17 +0000 (19:45 +0900)
This reverts commit 15c3e6ba9ecc31b6afca37e865d137f8302630e4

src/base/utility/FBaseUtil_IcuConverter.cpp

index f58d955..ae410f8 100644 (file)
@@ -208,14 +208,6 @@ ConvertWcsToMbsN(const wchar_t* pValue)
        SysTryReturn(NID_BASE_UTIL, pValue != null, null, E_INVALID_ARG, "[%s] Invalid argument is used. The pValue is null.", GetErrorMessage(E_INVALID_ARG));
 
        int len = wcslen(pValue);
-       if (len == 0)
-       {
-               char* pRet = new (std::nothrow) char[1];
-               SysTryReturn(NID_BASE_UTIL, pRet != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
-               pRet[0] = '\0';
-               SetLastResult(E_SUCCESS);
-               return pRet;
-       }
 
        UErrorCode err = U_ZERO_ERROR;
        UConverter* pConverter = ucnv_open("UTF-8", &err);