diff options
-rw-r--r-- | libbutl/fdstream.cxx | 7 | ||||
-rw-r--r-- | libbutl/fdstream.mxx | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/libbutl/fdstream.cxx b/libbutl/fdstream.cxx index 377681e..fad65f7 100644 --- a/libbutl/fdstream.cxx +++ b/libbutl/fdstream.cxx @@ -848,6 +848,13 @@ namespace butl } void ifdstream:: + open (auto_fd&& fd, fdstream_mode m, std::uint64_t pos) + { + open (mode (std::move (fd), m), pos); + skip_ = (m & fdstream_mode::skip) == fdstream_mode::skip; + } + + void ifdstream:: close () { if (skip_ && is_open () && good ()) diff --git a/libbutl/fdstream.mxx b/libbutl/fdstream.mxx index 0d56131..86ada51 100644 --- a/libbutl/fdstream.mxx +++ b/libbutl/fdstream.mxx @@ -521,11 +521,7 @@ LIBBUTL_MODEXPORT namespace butl } void - open (auto_fd&& fd, fdstream_mode m, std::uint64_t pos = 0) - { - open (std::move (fd), pos); - skip_ = (m & fdstream_mode::skip) == fdstream_mode::skip; - } + open (auto_fd&& fd, fdstream_mode m, std::uint64_t pos = 0); void close (); auto_fd release (); // Note: no skipping. |