diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-08 08:26:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-08 08:26:54 +0200 |
commit | 98c4038df36fb73601c58ccd885d1c2d3703cf6e (patch) | |
tree | 627256e1f79a5bcefef72d22cea01bfa490af398 /libbutl/sha256.cxx | |
parent | d7b7fd602b981dd6816b0e5c7c341e2cef272c17 (diff) |
Factor "buffered streambuf" interface from fdbuf to bufstreambuf
Also rename fdbuf to fdstreambuf for consistency.
Diffstat (limited to 'libbutl/sha256.cxx')
-rw-r--r-- | libbutl/sha256.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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 <cstdint> #include <cctype> // isxdigit() +#include <istream> #include <stdexcept> // invalid_argument #endif @@ -54,10 +55,9 @@ import std.core; #endif import butl.utility; // *case() -import butl.fdstream; #else #include <libbutl/utility.mxx> -#include <libbutl/fdstream.mxx> +#include <libbutl/bufstreambuf.hxx> #endif using namespace std; @@ -85,12 +85,12 @@ namespace butl } void sha256:: - append (ifdstream& is) + append (istream& is) { - fdbuf* buf (dynamic_cast<fdbuf*> (is.rdbuf ())); + bufstreambuf* buf (dynamic_cast<bufstreambuf*> (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); |