mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-15 23:20:06 +02:00
GH# 545: use short for sign
This commit is contained in:
@@ -87,7 +87,7 @@ bool strToInt(const char* pStr, I& result, short base, char thSep = ',')
|
|||||||
if (!pStr) return false;
|
if (!pStr) return false;
|
||||||
while (isspace(*pStr)) ++pStr;
|
while (isspace(*pStr)) ++pStr;
|
||||||
if (*pStr == '\0') return false;
|
if (*pStr == '\0') return false;
|
||||||
char sign = 1;
|
short sign = 1;
|
||||||
if ((base == 10) && (*pStr == '-'))
|
if ((base == 10) && (*pStr == '-'))
|
||||||
{
|
{
|
||||||
// Unsigned types can't be negative so abort parsing
|
// Unsigned types can't be negative so abort parsing
|
||||||
|
Reference in New Issue
Block a user