mirror of
https://github.com/vtnerd/monero-lws.git
synced 2025-01-24 19:25:52 +00:00
Fix integer wire serialization ambiguities
This commit is contained in:
parent
8c8c79e31c
commit
47f9ea4c7a
1 changed files with 12 additions and 4 deletions
|
@ -82,18 +82,26 @@ namespace wire
|
||||||
{
|
{
|
||||||
dest.integer(source);
|
dest.integer(source);
|
||||||
}
|
}
|
||||||
inline void write_bytes(writer& dest, const std::intmax_t source)
|
inline void write_bytes(writer& dest, const long source)
|
||||||
{
|
{
|
||||||
dest.integer(source);
|
dest.integer(std::intmax_t(source));
|
||||||
|
}
|
||||||
|
inline void write_bytes(writer& dest, const long long source)
|
||||||
|
{
|
||||||
|
dest.integer(std::intmax_t(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void write_bytes(writer& dest, const unsigned source)
|
inline void write_bytes(writer& dest, const unsigned source)
|
||||||
{
|
{
|
||||||
dest.unsigned_integer(source);
|
dest.unsigned_integer(source);
|
||||||
}
|
}
|
||||||
inline void write_bytes(writer& dest, const std::uintmax_t source)
|
inline void write_bytes(writer& dest, const unsigned long source)
|
||||||
{
|
{
|
||||||
dest.unsigned_integer(source);
|
dest.unsigned_integer(std::uintmax_t(source));
|
||||||
|
}
|
||||||
|
inline void write_bytes(writer& dest, const unsigned long long source)
|
||||||
|
{
|
||||||
|
dest.unsigned_integer(std::uintmax_t(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void write_bytes(writer& dest, const double source)
|
inline void write_bytes(writer& dest, const double source)
|
||||||
|
|
Loading…
Reference in a new issue