mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 17:30:44 +02:00
separate function for unsigned to string conversion
Separated unsigned integer conversion to eliminate warnings (and slightly improve performance). Added Darwin-clang warning suppression for unused functions/variables
This commit is contained in:
@@ -107,7 +107,7 @@ void NumberFormatter::appendHex(std::string& str, int value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz);
|
||||
uIntToStr(static_cast<unsigned int>(value), 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void NumberFormatter::appendHex(std::string& str, int value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz, false, width, '0');
|
||||
uIntToStr(static_cast<unsigned int>(value), 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ void NumberFormatter::append(std::string& str, unsigned value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz);
|
||||
uIntToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ void NumberFormatter::append(std::string& str, unsigned value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width);
|
||||
uIntToStr(value, 10, result, sz, false, width);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ void NumberFormatter::append0(std::string& str, unsigned int value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz);
|
||||
uIntToStr(value, 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ void NumberFormatter::appendHex(std::string& str, long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz);
|
||||
uIntToStr(static_cast<unsigned long>(value), 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ void NumberFormatter::appendHex(std::string& str, long value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz, false, width, '0');
|
||||
uIntToStr(static_cast<unsigned long>(value), 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ void NumberFormatter::append(std::string& str, unsigned long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz);
|
||||
uIntToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ void NumberFormatter::append(std::string& str, unsigned long value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ void NumberFormatter::append0(std::string& str, unsigned long value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz);
|
||||
uIntToStr(value, 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned long value, int width
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ void NumberFormatter::appendHex(std::string& str, Int64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz);
|
||||
uIntToStr(static_cast<UInt64>(value), 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ void NumberFormatter::appendHex(std::string& str, Int64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz, false, width, '0');
|
||||
uIntToStr(static_cast<UInt64>(value), 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ void NumberFormatter::append(std::string& str, UInt64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz);
|
||||
uIntToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ void NumberFormatter::append(std::string& str, UInt64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ void NumberFormatter::append0(std::string& str, UInt64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ void NumberFormatter::appendHex(std::string& str, UInt64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz);
|
||||
uIntToStr(value, 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -344,7 +344,7 @@ void NumberFormatter::appendHex(std::string& str, UInt64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 0x10, result, sz, false, width, '0');
|
||||
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user