Move to standard integer types #1147

This commit is contained in:
Alex Fabijanic
2017-10-05 14:55:38 -05:00
parent 426368c016
commit fccdd99135
6 changed files with 36 additions and 0 deletions

View File

@@ -71,8 +71,10 @@ public:
BinaryReader& operator >> (unsigned short& value);
BinaryReader& operator >> (int& value);
BinaryReader& operator >> (unsigned int& value);
#ifndef POCO_LONG_IS_64_BIT
BinaryReader& operator >> (long& value);
BinaryReader& operator >> (unsigned long& value);
#endif // POCO_LONG_IS_64_BIT
BinaryReader& operator >> (float& value);
BinaryReader& operator >> (double& value);
BinaryReader& operator >> (Int64& value);

View File

@@ -76,8 +76,10 @@ public:
BinaryWriter& operator << (unsigned short value);
BinaryWriter& operator << (int value);
BinaryWriter& operator << (unsigned int value);
#ifndef POCO_LONG_IS_64_BIT
BinaryWriter& operator << (long value);
BinaryWriter& operator << (unsigned long value);
#endif // POCO_LONG_IS_64_BIT
BinaryWriter& operator << (float value);
BinaryWriter& operator << (double value);
BinaryWriter& operator << (Int64 value);

View File

@@ -98,6 +98,8 @@ public:
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
#ifndef POCO_LONG_IS_64_BIT
static std::string format(long value);
/// Formats a long value in decimal notation.
@@ -150,6 +152,8 @@ public:
/// If prefix is true, "0x" prefix is prepended to the
/// resulting string.
#endif // POCO_LONG_IS_64_BIT
static std::string format(Int64 value);
/// Formats a 64-bit integer value in decimal notation.
@@ -277,6 +281,8 @@ public:
/// right justified and zero-padded in
/// a field having at least the specified width.
#ifndef POCO_LONG_IS_64_BIT
static void append(std::string& str, long value);
/// Formats a long value in decimal notation.
@@ -321,6 +327,8 @@ public:
/// right justified and zero-padded in a field having at least the
/// specified width.
#endif // POCO_LONG_IS_64_BIT
static void append(std::string& str, Int64 value);
/// Formats a 64-bit integer value in decimal notation.
@@ -482,6 +490,9 @@ inline std::string NumberFormatter::formatHex(unsigned value, int width, bool pr
}
#ifndef POCO_LONG_IS_64_BIT
inline std::string NumberFormatter::format(long value)
{
std::string result;
@@ -562,6 +573,9 @@ inline std::string NumberFormatter::formatHex(unsigned long value, int width, bo
}
#endif // POCO_LONG_IS_64_BIT
inline std::string NumberFormatter::format(Int64 value)
{
std::string result;