diff --git a/include/xrpl/beast/utility/Journal.h b/include/xrpl/beast/utility/Journal.h index 2800929785..4e9b2bb9e2 100644 --- a/include/xrpl/beast/utility/Journal.h +++ b/include/xrpl/beast/utility/Journal.h @@ -128,16 +128,6 @@ public: buffer_.append("\","sv); } std::string_view - writeInt(std::int8_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view - writeInt(std::int16_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view writeInt(std::int32_t val) const { return pushNumber(val, buffer_); @@ -148,21 +138,6 @@ public: return pushNumber(val, buffer_); } std::string_view - writeUInt(std::size_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view - writeUInt(std::uint8_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view - writeUInt(std::uint16_t val) const - { - return pushNumber(val, buffer_); - } - std::string_view writeUInt(std::uint32_t val) const { return pushNumber(val, buffer_); @@ -919,11 +894,25 @@ setJsonValue( std::string_view sv; if constexpr (std::is_signed_v) { - sv = writer.writeInt(value); + if constexpr (sizeof(ValueType) > 4) + { + sv = writer.writeInt(static_cast(value)); + } + else + { + sv = writer.writeInt(static_cast(value)); + } } else { - sv = writer.writeUInt(value); + if constexpr (sizeof(ValueType) > 4) + { + sv = writer.writeUInt(static_cast(value)); + } + else + { + sv = writer.writeUInt(static_cast(value)); + } } if (outStream) {