mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 08:31:43 +02:00
- VS2012: build/tests
- JSON: style and exceptions catch by ref fix - NumberParser: case-insensitive hex parsing - Dynamic::Var: const std::string& cast operator specialization (coaxing std::string ctor) - LocalDateTime: strftime fix (buffer too small for full tz string, use %Z instead of %z - makes no difference on windows but is more portable) - small buildwin.cmd vsvars32.bat call fix
This commit is contained in:
@@ -450,8 +450,8 @@ std::string AbstractConfiguration::uncheckedExpand(const std::string& value) con
|
||||
|
||||
int AbstractConfiguration::parseInt(const std::string& value)
|
||||
{
|
||||
if (value.compare(0, 2, "0x") == 0)
|
||||
return NumberParser::parseHex(value.substr(2));
|
||||
if ((value.compare(0, 2, "0x") == 0) || (value.compare(0, 2, "0X") == 0))
|
||||
return NumberParser::parseHex(value);
|
||||
else
|
||||
return NumberParser::parse(value);
|
||||
}
|
||||
@@ -459,8 +459,8 @@ int AbstractConfiguration::parseInt(const std::string& value)
|
||||
|
||||
int AbstractConfiguration::parseUInt(const std::string& value)
|
||||
{
|
||||
if (value.compare(0, 2, "0x") == 0)
|
||||
return NumberParser::parseHex(value.substr(2));
|
||||
if ((value.compare(0, 2, "0x") == 0) || (value.compare(0, 2, "0X") == 0))
|
||||
return NumberParser::parseHex(value);
|
||||
else
|
||||
return NumberParser::parseUnsigned(value);
|
||||
}
|
||||
@@ -468,8 +468,8 @@ int AbstractConfiguration::parseUInt(const std::string& value)
|
||||
|
||||
Int64 AbstractConfiguration::parseInt64(const std::string& value)
|
||||
{
|
||||
if (value.compare(0, 2, "0x") == 0)
|
||||
return NumberParser::parseHex64(value.substr(2));
|
||||
if ((value.compare(0, 2, "0x") == 0) || (value.compare(0, 2, "0X") == 0))
|
||||
return NumberParser::parseHex64(value);
|
||||
else
|
||||
return NumberParser::parse64(value);
|
||||
}
|
||||
@@ -477,8 +477,8 @@ Int64 AbstractConfiguration::parseInt64(const std::string& value)
|
||||
|
||||
UInt64 AbstractConfiguration::parseUInt64(const std::string& value)
|
||||
{
|
||||
if (value.compare(0, 2, "0x") == 0)
|
||||
return NumberParser::parseHex64(value.substr(2));
|
||||
if ((value.compare(0, 2, "0x") == 0) || (value.compare(0, 2, "0X") == 0))
|
||||
return NumberParser::parseHex64(value);
|
||||
else
|
||||
return NumberParser::parseUnsigned64(value);
|
||||
}
|
||||
|
Reference in New Issue
Block a user