actually use write_bytes directly

This commit is contained in:
q66 2017-02-10 17:48:19 +01:00
parent 922f19b776
commit d06637eac6

View file

@ -190,10 +190,10 @@ namespace detail {
struct FmtStreamRange: OutputRange<FmtStreamRange, char> { struct FmtStreamRange: OutputRange<FmtStreamRange, char> {
FmtStreamRange(Stream &s): p_s(s) {} FmtStreamRange(Stream &s): p_s(s) {}
bool put(char c) { bool put(char c) {
return p_s.putchar(c); return p_s.write_bytes(&c, 1) == 1;
} }
size_t put_n(char const *p, size_t n) { size_t put_n(char const *p, size_t n) {
return p_s.put(p, n); return p_s.write_bytes(p, n);
} }
Stream &p_s; Stream &p_s;
}; };