[devel_3.0_main] Cherry-pick Beautification of source-code. 80383
[platform/framework/native/appfw.git] / src / base / FBaseString.cpp
index 56f37c5..ed75249 100644 (file)
@@ -18,7 +18,6 @@
 * @file                FBaseString.cpp
 * @brief       This is the implementation for String class.
 */
-
 #include <wchar.h>
 #include <math.h>
 #include <stdlib.h>
@@ -40,7 +39,6 @@
 #include "FBase_String.h"
 #include "FBaseUtil_IcuConverter.h"
 
-
 namespace Tizen { namespace Base
 {
 
@@ -1060,7 +1058,7 @@ String::SetCapacity(int capacity)
 result
 String::SetCharAt(wchar_t ch, int indexAt)
 {
-       SysTryReturn(NID_BASE,indexAt >= 0 && indexAt < __length, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
+       SysTryReturn(NID_BASE, indexAt >= 0 && indexAt < __length, E_OUT_OF_RANGE, E_OUT_OF_RANGE,
                "[%s] The indexAt(%d) MUST be greater than or equal to 0, and less then the length of this string(%d).",
                GetErrorMessage(E_OUT_OF_RANGE), indexAt, __length);
 
@@ -1147,7 +1145,7 @@ String::StartsWith(const String& str, int startIndex) const
        SysTryReturn(NID_BASE, startIndex >= 0 && startIndex < __length, false, E_OUT_OF_RANGE,
                "[%s] The startIndex(%d) MUST be greater than or equal to 0, and less than the length of this string(%d).",
                GetErrorMessage(E_OUT_OF_RANGE), startIndex, __length);
-       SysTryReturn(NID_BASE, str.__length > 0, false, E_INVALID_ARG, 
+       SysTryReturn(NID_BASE, str.__length > 0, false, E_INVALID_ARG,
                "[%s] Invalid argument is used. The length of str(%d) MUST be greater than 0.",
                GetErrorMessage(E_INVALID_ARG), str.__length);
 
@@ -1382,7 +1380,7 @@ String::Trim(void)
        bool trimRight = lastIndex < __length;
        bool trimLeft = startIndex > 0;
 
-       if (!trimRight && !trimLeft)    // nothing to trim
+       if (!trimRight && !trimLeft)    // nothing to trim
        {
                return;
        }
@@ -1477,7 +1475,7 @@ String::ExpandCapacity(int minCapacity)
                capacity = minCapacity;
        }
 
-       std::unique_ptr<wchar_t []> pNewValue(new (std::nothrow) wchar_t[capacity + 1]); // + 1 for null character
+       std::unique_ptr< wchar_t[] > pNewValue(new (std::nothrow) wchar_t[capacity + 1]); // + 1 for null character
        SysTryReturn(NID_BASE, pNewValue != null, false, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
                GetErrorMessage(E_OUT_OF_MEMORY));