fixes for macos/clang

This commit is contained in:
Günter Obiltschnig
2020-01-09 11:53:03 +01:00
parent 1bf40a0cd2
commit 03d1dd9822
41 changed files with 389 additions and 1317 deletions

View File

@@ -61,7 +61,7 @@ public:
static std::string formatHex(int value, bool prefix = false);
/// Formats an int value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
/// The value is treated as unsigned.
@@ -69,7 +69,7 @@ public:
/// Formats a int value in hexadecimal notation,
/// right justified and zero-padded in
/// a field having at least the specified width.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
/// The value is treated as unsigned.
@@ -88,14 +88,14 @@ public:
static std::string formatHex(unsigned value, bool prefix = false);
/// Formats an unsigned int value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
static std::string formatHex(unsigned value, int width, bool prefix = false);
/// Formats a int value in hexadecimal notation,
/// right justified and zero-padded in
/// a field having at least the specified width.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
static std::string format(long value);
@@ -113,7 +113,7 @@ public:
static std::string formatHex(long value, bool prefix = false);
/// Formats an unsigned long value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
/// The value is treated as unsigned.
@@ -121,7 +121,7 @@ public:
/// Formats an unsigned long value in hexadecimal notation,
/// right justified and zero-padded in a field having at least the
/// specified width.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
/// The value is treated as unsigned.
@@ -140,70 +140,18 @@ public:
static std::string formatHex(unsigned long value, bool prefix = false);
/// Formats an unsigned long value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
static std::string formatHex(unsigned long value, int width, bool prefix = false);
/// Formats an unsigned long value in hexadecimal notation,
/// right justified and zero-padded in a field having at least the
/// specified width.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
#ifdef POCO_HAVE_INT64
#ifdef POCO_LONG_IS_64_BIT
static std::string format(long long value);
/// Formats a 64-bit integer value in decimal notation.
static std::string format(long long value, int width);
/// Formats a 64-bit integer value in decimal notation,
/// right justified in a field having at least the specified width.
static std::string format0(long long value, int width);
/// Formats a 64-bit integer value in decimal notation,
/// right justified and zero-padded in a field having at least
/// the specified width.
static std::string formatHex(long long value, bool prefix = false);
/// Formats a 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
/// The value is treated as unsigned.
static std::string formatHex(long long value, int width, bool prefix = false);
/// Formats a 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least
/// the specified width.
/// The value is treated as unsigned.
/// If prefix is true, "0x" prefix is prepended to the resulting string.
static std::string format(unsigned long long value);
/// Formats an unsigned 64-bit integer value in decimal notation.
static std::string format(unsigned long long value, int width);
/// Formats an unsigned 64-bit integer value in decimal notation,
/// right justified in a field having at least the specified width.
static std::string format0(unsigned long long value, int width);
/// Formats an unsigned 64-bit integer value in decimal notation,
/// right justified and zero-padded in a field having at least the
/// specified width.
static std::string formatHex(unsigned long long value, bool prefix = false);
/// Formats a 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
static std::string formatHex(unsigned long long value, int width, bool prefix = false);
/// Formats a 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least
/// the specified width. If prefix is true, "0x" prefix is
/// prepended to the resulting string.
#else // ifndef POCO_LONG_IS_64_BIT
static std::string format(Int64 value);
/// Formats a 64-bit integer value in decimal notation.
@@ -218,7 +166,7 @@ public:
static std::string formatHex(Int64 value, bool prefix = false);
/// Formats a 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
/// The value is treated as unsigned.
@@ -243,7 +191,7 @@ public:
static std::string formatHex(UInt64 value, bool prefix = false);
/// Formats a 64-bit integer value in hexadecimal notation.
/// If prefix is true, "0x" prefix is prepended to the
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
static std::string formatHex(UInt64 value, int width, bool prefix = false);
@@ -252,8 +200,6 @@ public:
/// the specified width. If prefix is true, "0x" prefix is
/// prepended to the resulting string.
#endif // ifdef POCO_LONG_IS_64_BIT
#endif // ifdef POCO_HAVE_INT64
static std::string format(float value);
@@ -381,52 +327,6 @@ public:
#ifdef POCO_HAVE_INT64
#ifdef POCO_LONG_IS_64_BIT
static void append(std::string& str, long long value);
/// Formats a 64-bit integer value in decimal notation.
static void append(std::string& str, long long value, int width);
/// Formats a 64-bit integer value in decimal notation,
/// right justified in a field having at least the specified width.
static void append0(std::string& str, long long value, int width);
/// Formats a 64-bit integer value in decimal notation,
/// right justified and zero-padded in a field having at least
/// the specified width.
static void appendHex(std::string& str, long long value);
/// Formats a 64-bit integer value in hexadecimal notation.
/// The value is treated as unsigned.
static void appendHex(std::string& str, long long value, int width);
/// Formats a 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least
/// the specified width.
/// The value is treated as unsigned.
static void append(std::string& str, unsigned long long value);
/// Formats an unsigned 64-bit integer value in decimal notation.
static void append(std::string& str, unsigned long long value, int width);
/// Formats an unsigned 64-bit integer value in decimal notation,
/// right justified in a field having at least the specified width.
static void append0(std::string& str, unsigned long long value, int width);
/// Formats an unsigned 64-bit integer value in decimal notation,
/// right justified and zero-padded in a field having at least the
/// specified width.
static void appendHex(std::string& str, unsigned long long value);
/// Formats a 64-bit integer value in hexadecimal notation.
static void appendHex(std::string& str, unsigned long long value, int width);
/// Formats a 64-bit integer value in hexadecimal notation,
/// right justified and zero-padded in a field having at least
/// the specified width.
#else // ifndef POCO_LONG_IS_64_BIT
static void append(std::string& str, Int64 value);
/// Formats a 64-bit integer value in decimal notation.
@@ -469,8 +369,6 @@ public:
/// right justified and zero-padded in a field having at least
/// the specified width.
#endif // ifdef POCO_LONG_IS_64_BIT
#endif // ifdef POCO_HAVE_INT64
static void append(std::string& str, float value);
@@ -674,91 +572,6 @@ inline std::string NumberFormatter::formatHex(unsigned long value, int width, bo
#ifdef POCO_HAVE_INT64
#ifdef POCO_LONG_IS_64_BIT
inline std::string NumberFormatter::format(long long value)
{
std::string result;
intToStr(value, 10, result);
return result;
}
inline std::string NumberFormatter::format(long long value, int width)
{
std::string result;
intToStr(value, 10, result, false, width, ' ');
return result;
}
inline std::string NumberFormatter::format0(long long value, int width)
{
std::string result;
intToStr(value, 10, result, false, width, '0');
return result;
}
inline std::string NumberFormatter::formatHex(long long value, bool prefix)
{
std::string result;
uIntToStr(static_cast<unsigned long long>(value), 0x10, result, prefix);
return result;
}
inline std::string NumberFormatter::formatHex(long long value, int width, bool prefix)
{
std::string result;
uIntToStr(static_cast<unsigned long long>(value), 0x10, result, prefix, width, '0');
return result;
}
inline std::string NumberFormatter::format(unsigned long long value)
{
std::string result;
uIntToStr(value, 10, result);
return result;
}
inline std::string NumberFormatter::format(unsigned long long value, int width)
{
std::string result;
uIntToStr(value, 10, result, false, width, ' ');
return result;
}
inline std::string NumberFormatter::format0(unsigned long long value, int width)
{
std::string result;
uIntToStr(value, 10, result, false, width, '0');
return result;
}
inline std::string NumberFormatter::formatHex(unsigned long long value, bool prefix)
{
std::string result;
uIntToStr(value, 0x10, result, prefix);
return result;
}
inline std::string NumberFormatter::formatHex(unsigned long long value, int width, bool prefix)
{
std::string result;
uIntToStr(value, 0x10, result, prefix, width, '0');
return result;
}
#else // ifndef POCO_LONG_IS_64_BIT
inline std::string NumberFormatter::format(Int64 value)
{
@@ -840,8 +653,6 @@ inline std::string NumberFormatter::formatHex(UInt64 value, int width, bool pref
}
#endif // ifdef POCO_LONG_IS_64_BIT
#endif // ifdef POCO_HAVE_INT64