[2.2.1] Remove privacy input data in log & Remove needless log
[platform/framework/native/appfw.git] / src / base / FBaseLong.cpp
index b6ed711..54bee6e 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -20,7 +19,6 @@
  * @brief              This is the implementation file for Long class.
  * @see                        Number
  */
-
 #include <wchar.h>
 #include <limits.h>
 #include <errno.h>
@@ -73,7 +71,7 @@ Long::CompareTo(const Long& value) const
 bool
 Long::Equals(const Object& obj) const
 {
-       const Long* pOther = dynamic_cast <const Long*>(&obj);
+       const Long* pOther = dynamic_cast< const Long* >(&obj);
        if (pOther == null)
        {
                return false;
@@ -85,20 +83,20 @@ Long::Equals(const Object& obj) const
 int
 Long::GetHashCode(void) const
 {
-       return static_cast<int> (value);
+       return static_cast< int >(value);
 }
 
 int
 Long::GetHashCode(long val)
 {
-       return static_cast<int> (val);
+       return static_cast< int >(val);
 }
 
 result
 Long::Decode(const String& s, long& ret)
 {
        SysTryReturn(NID_BASE, s.GetLength() >= 1, E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s MUST be greater than 0.", GetErrorMessage(E_NUM_FORMAT));
+               "[%s] The length of input String MUST be greater than 0.", GetErrorMessage(E_NUM_FORMAT));
 
        int radix = 0;
        int startIndex = 0;
@@ -149,10 +147,6 @@ Long::Decode(const String& s, long& ret)
 result
 Long::Parse(const String& s, long& ret)
 {
-       int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0 && len < 12), E_NUM_FORMAT, E_NUM_FORMAT,
-               "[%s] The length of s(%ls) MUST be greater than 0 and less than 12.", GetErrorMessage(E_NUM_FORMAT), s.GetPointer());
-
        return Parse(s, Character::RADIX_DECIMAL, ret);
 }
 
@@ -164,13 +158,13 @@ Long::Parse(const String& s, int radix, long& ret)
                "[%s] The radix(%d) MUST be one of 2, 8, 10 and 16.", GetErrorMessage(E_OUT_OF_RANGE), radix);
 
        int len = s.GetLength();
-       SysTryReturn(NID_BASE, (len > 0), E_NUM_FORMAT, E_NUM_FORMAT, "[%s] The length of s MUST be greater than 0.",
+       SysTryReturn(NID_BASE, len > 0, E_NUM_FORMAT, E_NUM_FORMAT, "[%s] The length of input String MUST be greater than 0.",
                GetErrorMessage(E_NUM_FORMAT));
 
        errno = 0;
        wchar_t* pEnd = null;
        long tmpRet = wcstol(s.GetPointer(), &pEnd, radix);
-       SysTryReturn(NID_BASE, (pEnd[0] == 0), E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Long parse failed. Scan stopped at (%ls).",
+       SysTryReturn(NID_BASE, pEnd[0] == 0, E_NUM_FORMAT, E_NUM_FORMAT, "[%s] Long parse failed. Scan stopped at (%ls).",
                GetErrorMessage(E_NUM_FORMAT), pEnd);
        SysTryReturn(NID_BASE, !((tmpRet == LONG_MAX || tmpRet == LONG_MIN) && (errno != 0)), E_NUM_FORMAT, E_NUM_FORMAT,
                "[%s] Parsed value cannot fit into a Long.", GetErrorMessage(E_NUM_FORMAT));
@@ -182,19 +176,19 @@ Long::Parse(const String& s, int radix, long& ret)
 char
 Long::ToChar(void) const
 {
-       return static_cast<char> (value);
+       return static_cast< char >(value);
 }
 
 short
 Long::ToShort(void) const
 {
-       return static_cast<short> (value);
+       return static_cast< short >(value);
 }
 
 int
 Long::ToInt(void) const
 {
-       return static_cast<int> (value);
+       return static_cast< int >(value);
 }
 
 long
@@ -206,19 +200,19 @@ Long::ToLong(void) const
 long long
 Long::ToLongLong(void) const
 {
-       return static_cast<long long> (value);
+       return static_cast< long long >(value);
 }
 
 float
 Long::ToFloat(void) const
 {
-       return static_cast<float> (value);
+       return static_cast< float >(value);
 }
 
 double
 Long::ToDouble(void) const
 {
-       return static_cast<double> (value);
+       return static_cast< double >(value);
 }
 
 String