aboutsummaryrefslogtreecommitdiff
path: root/libbutl/fdstream.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-05-26 17:20:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-05-26 17:20:30 +0200
commit1b57e247b8d1a7a41a8ee45d6d524c71edd63a81 (patch)
treeb226e55b4ea9c2c4ecba286ac9e3dccf9d09292d /libbutl/fdstream.hxx
parent4c4f3160258e799c65dccc80c00bb7ef16daac01 (diff)
Optimize char_scanner if used with ifdstream
Diffstat (limited to 'libbutl/fdstream.hxx')
-rw-r--r--libbutl/fdstream.hxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/libbutl/fdstream.hxx b/libbutl/fdstream.hxx
index e1f5790..dd33263 100644
--- a/libbutl/fdstream.hxx
+++ b/libbutl/fdstream.hxx
@@ -122,8 +122,10 @@ namespace butl
fd () const {return fd_.get ();}
public:
- using int_type = std::basic_streambuf<char>::int_type;
- using traits_type = std::basic_streambuf<char>::traits_type;
+ using base = std::basic_streambuf<char>;
+
+ using int_type = base::int_type;
+ using traits_type = base::traits_type;
// basic_streambuf input interface.
//
@@ -134,6 +136,12 @@ namespace butl
virtual int_type
underflow ();
+ // Direct access to the get area. Use with caution.
+ //
+ using base::gptr;
+ using base::egptr;
+ using base::gbump;
+
private:
bool
load ();