Use COutputStream::Put

Former-commit-id: a02037e266
This commit is contained in:
Henrique Gemignani Passos Lima
2022-10-11 21:35:41 +03:00
parent 9a4d5ae6bc
commit 7ec4707661
7 changed files with 27 additions and 24 deletions

View File

@@ -4,10 +4,9 @@
#include "types.h"
class COutputStream;
template < typename T >
void coutput_stream_helper(const T& t, COutputStream& out) {
t.PutTo(out);
}
void coutput_stream_helper(const T& t, COutputStream& out);
class COutputStream {
void DoPut(const void* ptr, size_t len);
@@ -57,6 +56,11 @@ private:
uchar mScratch[96];
};
template < typename T >
inline void coutput_stream_helper(const T& t, COutputStream& out) {
t.PutTo(out);
}
template <>
inline void coutput_stream_helper(const float& t, COutputStream& out) {
int tmp = *(int*)&t;