mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-24 09:12:28 +02:00
Net Windows automatic (un)initialize
automatic network (un)initialization on windows NumericString 64-bit compile/warning fixes
This commit is contained in:
@@ -79,7 +79,7 @@ std::string NumberFormatter::format(bool value, BoolFormat format)
|
||||
void NumberFormatter::append(std::string& str, int value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ void NumberFormatter::append(std::string& str, int value)
|
||||
void NumberFormatter::append(std::string& str, int value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -97,7 +97,7 @@ void NumberFormatter::append(std::string& str, int value, int width)
|
||||
void NumberFormatter::append0(std::string& str, int value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -106,7 +106,7 @@ void NumberFormatter::append0(std::string& str, int value, int width)
|
||||
void NumberFormatter::appendHex(std::string& str, int value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(static_cast<unsigned int>(value), 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ void NumberFormatter::appendHex(std::string& str, int value)
|
||||
void NumberFormatter::appendHex(std::string& str, int value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(static_cast<unsigned int>(value), 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -124,7 +124,7 @@ void NumberFormatter::appendHex(std::string& str, int value, int width)
|
||||
void NumberFormatter::append(std::string& str, unsigned value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ void NumberFormatter::append(std::string& str, unsigned value)
|
||||
void NumberFormatter::append(std::string& str, unsigned value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz, false, width);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void NumberFormatter::append(std::string& str, unsigned value, int width)
|
||||
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;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ void NumberFormatter::append0(std::string& str, unsigned int value, int width)
|
||||
void NumberFormatter::appendHex(std::string& str, unsigned value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -160,7 +160,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned value)
|
||||
void NumberFormatter::appendHex(std::string& str, unsigned value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned value, int width)
|
||||
void NumberFormatter::append(std::string& str, long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void NumberFormatter::append(std::string& str, long value)
|
||||
void NumberFormatter::append(std::string& str, long value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -187,7 +187,7 @@ void NumberFormatter::append(std::string& str, long value, int width)
|
||||
void NumberFormatter::append0(std::string& str, long value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -196,7 +196,7 @@ void NumberFormatter::append0(std::string& str, long value, int width)
|
||||
void NumberFormatter::appendHex(std::string& str, long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(static_cast<unsigned long>(value), 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -205,7 +205,7 @@ void NumberFormatter::appendHex(std::string& str, long value)
|
||||
void NumberFormatter::appendHex(std::string& str, long value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(static_cast<unsigned long>(value), 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ void NumberFormatter::appendHex(std::string& str, long value, int width)
|
||||
void NumberFormatter::append(std::string& str, unsigned long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -223,7 +223,7 @@ void NumberFormatter::append(std::string& str, unsigned long value)
|
||||
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;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -232,7 +232,7 @@ void NumberFormatter::append(std::string& str, unsigned long value, int width)
|
||||
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;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -241,7 +241,7 @@ void NumberFormatter::append0(std::string& str, unsigned long value, int width)
|
||||
void NumberFormatter::appendHex(std::string& str, unsigned long value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -250,7 +250,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned long value)
|
||||
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;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -262,7 +262,7 @@ void NumberFormatter::appendHex(std::string& str, unsigned long value, int width
|
||||
void NumberFormatter::append(std::string& str, Int64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -271,7 +271,7 @@ void NumberFormatter::append(std::string& str, Int64 value)
|
||||
void NumberFormatter::append(std::string& str, Int64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -280,7 +280,7 @@ void NumberFormatter::append(std::string& str, Int64 value, int width)
|
||||
void NumberFormatter::append0(std::string& str, Int64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
intToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -289,7 +289,7 @@ void NumberFormatter::append0(std::string& str, Int64 value, int width)
|
||||
void NumberFormatter::appendHex(std::string& str, Int64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(static_cast<UInt64>(value), 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -298,7 +298,7 @@ void NumberFormatter::appendHex(std::string& str, Int64 value)
|
||||
void NumberFormatter::appendHex(std::string& str, Int64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(static_cast<UInt64>(value), 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -307,7 +307,7 @@ void NumberFormatter::appendHex(std::string& str, Int64 value, int width)
|
||||
void NumberFormatter::append(std::string& str, UInt64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -316,7 +316,7 @@ void NumberFormatter::append(std::string& str, UInt64 value)
|
||||
void NumberFormatter::append(std::string& str, UInt64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -325,7 +325,7 @@ void NumberFormatter::append(std::string& str, UInt64 value, int width)
|
||||
void NumberFormatter::append0(std::string& str, UInt64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -334,7 +334,7 @@ void NumberFormatter::append0(std::string& str, UInt64 value, int width)
|
||||
void NumberFormatter::appendHex(std::string& str, UInt64 value)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 0x10, result, sz);
|
||||
str.append(result, sz);
|
||||
}
|
||||
@@ -343,7 +343,7 @@ void NumberFormatter::appendHex(std::string& str, UInt64 value)
|
||||
void NumberFormatter::appendHex(std::string& str, UInt64 value, int width)
|
||||
{
|
||||
char result[NF_MAX_INT_STRING_LEN];
|
||||
unsigned sz = NF_MAX_INT_STRING_LEN;
|
||||
std::size_t sz = NF_MAX_INT_STRING_LEN;
|
||||
uIntToStr(value, 0x10, result, sz, false, width, '0');
|
||||
str.append(result, sz);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ float strToFloat(const char* str)
|
||||
int flags = StringToDoubleConverter::ALLOW_LEADING_SPACES |
|
||||
StringToDoubleConverter::ALLOW_TRAILING_SPACES;
|
||||
StringToDoubleConverter converter(flags, 0.0, Single::NaN(), POCO_FLT_INF, POCO_FLT_NAN);
|
||||
float result = converter.StringToFloat(str, strlen(str), &processed);
|
||||
float result = converter.StringToFloat(str, static_cast<int>(strlen(str)), &processed);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ double strToDouble(const char* str)
|
||||
int flags = StringToDoubleConverter::ALLOW_LEADING_SPACES |
|
||||
StringToDoubleConverter::ALLOW_TRAILING_SPACES;
|
||||
StringToDoubleConverter converter(flags, 0.0, Double::NaN(), POCO_FLT_INF, POCO_FLT_NAN);
|
||||
double result = converter.StringToDouble(str, strlen(str), &processed);
|
||||
double result = converter.StringToDouble(str, static_cast<int>(strlen(str)), &processed);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ StringTokenizer::~StringTokenizer()
|
||||
|
||||
void StringTokenizer::trim (std::string& token)
|
||||
{
|
||||
int front = 0, back = 0, length = token.length();
|
||||
std::size_t front = 0, back = 0, length = token.length();
|
||||
std::string::const_iterator tIt = token.begin();
|
||||
std::string::const_iterator tEnd = token.end();
|
||||
for (; tIt != tEnd; ++tIt, ++front)
|
||||
|
||||
Reference in New Issue
Block a user