From 98c4038df36fb73601c58ccd885d1c2d3703cf6e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 8 Sep 2021 08:26:54 +0200 Subject: Factor "buffered streambuf" interface from fdbuf to bufstreambuf Also rename fdbuf to fdstreambuf for consistency. --- libbutl/sha256.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libbutl/sha256.cxx') diff --git a/libbutl/sha256.cxx b/libbutl/sha256.cxx index 2528693..8a34402 100644 --- a/libbutl/sha256.cxx +++ b/libbutl/sha256.cxx @@ -34,6 +34,7 @@ extern "C" #include #include // isxdigit() +#include #include // invalid_argument #endif @@ -54,10 +55,9 @@ import std.core; #endif import butl.utility; // *case() -import butl.fdstream; #else #include -#include +#include #endif using namespace std; @@ -85,12 +85,12 @@ namespace butl } void sha256:: - append (ifdstream& is) + append (istream& is) { - fdbuf* buf (dynamic_cast (is.rdbuf ())); + bufstreambuf* buf (dynamic_cast (is.rdbuf ())); assert (buf != nullptr); - while (is.peek () != ifdstream::traits_type::eof () && is.good ()) + while (is.peek () != istream::traits_type::eof () && is.good ()) { size_t n (buf->egptr () - buf->gptr ()); append (buf->gptr (), n); -- cgit v1.1