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/sha1.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libbutl/sha1.cxx') diff --git a/libbutl/sha1.cxx b/libbutl/sha1.cxx index 6a5e9db..f4a6bad 100644 --- a/libbutl/sha1.cxx +++ b/libbutl/sha1.cxx @@ -47,6 +47,8 @@ extern "C" #include #include #include + +#include #endif // Other includes. @@ -60,10 +62,8 @@ module butl.sha1; import std.core; #endif #endif - -import butl.fdstream; #else -#include +#include #endif using namespace std; @@ -91,12 +91,12 @@ namespace butl } void sha1:: - 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