diff --git a/src/io/BufferedReader.hxx b/src/io/BufferedReader.hxx index d22a2ecf9..8df6b3909 100644 --- a/src/io/BufferedReader.hxx +++ b/src/io/BufferedReader.hxx @@ -66,6 +66,18 @@ public: */ void ReadFull(std::span dest); + template + void ReadFullT(T &dest) { + ReadFull({&dest, sizeof(dest)}); + } + + template + T ReadFullT() { + T dest; + ReadFullT(dest); + return dest; + } + char *ReadLine(); unsigned GetLineNumber() const noexcept {