mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix build error
Signed-off-by: JCW <a1q123456@users.noreply.github.com>
This commit is contained in:
@@ -128,16 +128,6 @@ public:
|
|||||||
buffer_.append("\","sv);
|
buffer_.append("\","sv);
|
||||||
}
|
}
|
||||||
std::string_view
|
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
|
writeInt(std::int32_t val) const
|
||||||
{
|
{
|
||||||
return pushNumber(val, buffer_);
|
return pushNumber(val, buffer_);
|
||||||
@@ -148,21 +138,6 @@ public:
|
|||||||
return pushNumber(val, buffer_);
|
return pushNumber(val, buffer_);
|
||||||
}
|
}
|
||||||
std::string_view
|
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
|
writeUInt(std::uint32_t val) const
|
||||||
{
|
{
|
||||||
return pushNumber(val, buffer_);
|
return pushNumber(val, buffer_);
|
||||||
@@ -919,11 +894,25 @@ setJsonValue(
|
|||||||
std::string_view sv;
|
std::string_view sv;
|
||||||
if constexpr (std::is_signed_v<ValueType>)
|
if constexpr (std::is_signed_v<ValueType>)
|
||||||
{
|
{
|
||||||
sv = writer.writeInt(value);
|
if constexpr (sizeof(ValueType) > 4)
|
||||||
|
{
|
||||||
|
sv = writer.writeInt(static_cast<std::int64_t>(value));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sv = writer.writeUInt(value);
|
sv = writer.writeInt(static_cast<std::int32_t>(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if constexpr (sizeof(ValueType) > 4)
|
||||||
|
{
|
||||||
|
sv = writer.writeUInt(static_cast<std::uint64_t>(value));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sv = writer.writeUInt(static_cast<std::uint32_t>(value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (outStream)
|
if (outStream)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user