Commit 0a873db7 authored by Matthias Vallentin's avatar Matthias Vallentin

Facilitate reuse of stream (de)serializers

Changing visibility of common functionality from "private" to
"protected" makes it easier to write derived classes.
parent d38672e7
......@@ -181,7 +181,6 @@ protected:
}
}
private:
error range_check(std::streamsize got, size_t need) {
if (got >= 0 && static_cast<size_t>(got) == need)
return none;
......@@ -209,6 +208,7 @@ private:
return none;
}
private:
Streambuf streambuf_;
};
......
......@@ -177,13 +177,13 @@ protected:
}
}
private:
template <class T>
error apply_int(T x) {
auto y = detail::to_network_order(x);
return apply_raw(sizeof(T), &y);
}
private:
Streambuf streambuf_;
};
......
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