aboutsummaryrefslogtreecommitdiff
path: root/libbutl/sha1.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-09-08 08:26:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-09-08 08:26:54 +0200
commit98c4038df36fb73601c58ccd885d1c2d3703cf6e (patch)
tree627256e1f79a5bcefef72d22cea01bfa490af398 /libbutl/sha1.cxx
parentd7b7fd602b981dd6816b0e5c7c341e2cef272c17 (diff)
Factor "buffered streambuf" interface from fdbuf to bufstreambuf
Also rename fdbuf to fdstreambuf for consistency.
Diffstat (limited to 'libbutl/sha1.cxx')
-rw-r--r--libbutl/sha1.cxx12
1 files changed, 6 insertions, 6 deletions
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 <string>
#include <cstddef>
#include <cstdint>
+
+#include <istream>
#endif
// Other includes.
@@ -60,10 +62,8 @@ module butl.sha1;
import std.core;
#endif
#endif
-
-import butl.fdstream;
#else
-#include <libbutl/fdstream.mxx>
+#include <libbutl/bufstreambuf.hxx>
#endif
using namespace std;
@@ -91,12 +91,12 @@ namespace butl
}
void sha1::
- 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);