Commit d1f9b06f authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

io/BufferedOutputStream: add WriteT()

parent f9f3306d
...@@ -58,8 +58,13 @@ public: ...@@ -58,8 +58,13 @@ public:
void Write(const void *data, std::size_t size); void Write(const void *data, std::size_t size);
template<typename T>
void WriteT(const T &value) {
Write(&value, sizeof(value));
}
void Write(const char &ch) { void Write(const char &ch) {
Write(&ch, sizeof(ch)); WriteT(ch);
} }
void Write(const char *p); void Write(const char *p);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment