Merge "BigInteger class implementation" into tizen
[platform/framework/native/appfw.git] / src / base / FBaseInteger.cpp
index 3258d2f..49d0276 100644 (file)
@@ -116,20 +116,8 @@ Integer::Parse(const String& s, int radix, int& ret)
        long value;
        result r = _NumberUtil::Parse(s, radix, value);
        SysTryReturnResult(NID_BASE, r == E_SUCCESS, r, "Propagating.");
-
-       if (value > Integer::VALUE_MAX)
-       {
-               ret = Integer::VALUE_MAX;
-       }
-       else if (value < Integer::VALUE_MIN)
-       {
-               ret = Integer::VALUE_MIN;
-       }
-       else
-       {
-               ret = static_cast< int >(value);
-       }
-       return r;
+       ret = static_cast< int >(value);
+       return E_SUCCESS;
 }
 
 char
@@ -138,6 +126,12 @@ Integer::ToChar(void) const
        return static_cast< char >(value);
 }
 
+int8_t
+Integer::ToInt8(void) const
+{
+       return static_cast< int8_t >(value);
+}
+
 short
 Integer::ToShort(void) const
 {