operator<< for VarInt

This commit is contained in:
2025-03-04 11:44:40 +01:00
parent d501c0181d
commit fa6ba74068
2 changed files with 12 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
#include <sp/common/VarInt.h>
#include <stdexcept>
#include <sp/common/DataBuffer.h>
#include <stdexcept>
namespace sp {
@@ -49,4 +49,9 @@ DataBuffer& operator>>(DataBuffer& in, VarInt& var) {
return in;
}
std::ostream& operator<<(std::ostream& a_Stream, const sp::VarInt& a_VarInt) {
a_Stream << a_VarInt.GetValue();
return a_Stream;
}
} // namespace sp