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
return static_cast< char >(value);
}
+int8_t
+Integer::ToInt8(void) const
+{
+ return static_cast< int8_t >(value);
+}
+
short
Integer::ToShort(void) const
{