From 1153715608f5eb901293d63147ea7502ac275e56 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 17 May 2019 11:29:19 +0200 Subject: [PATCH] input/buffering: rename "read_error" to "error" The "seek_error" attribute will be eliminated soon. --- src/input/BufferingInputStream.cxx | 10 +++++----- src/input/BufferingInputStream.hxx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/input/BufferingInputStream.cxx b/src/input/BufferingInputStream.cxx index 7412a7025..246f911f9 100644 --- a/src/input/BufferingInputStream.cxx +++ b/src/input/BufferingInputStream.cxx @@ -48,8 +48,8 @@ BufferingInputStream::~BufferingInputStream() noexcept void BufferingInputStream::Check() { - if (read_error) - std::rethrow_exception(read_error); + if (error) + std::rethrow_exception(error); if (input) input->Check(); @@ -111,8 +111,8 @@ BufferingInputStream::Read(std::unique_lock &lock, void *ptr, size_t s) return nbytes; } - if (read_error) - std::rethrow_exception(read_error); + if (error) + std::rethrow_exception(error); client_cond.wait(lock); } @@ -221,7 +221,7 @@ BufferingInputStream::RunThread() noexcept try { RunThreadLocked(lock); } catch (...) { - read_error = std::current_exception(); + error = std::current_exception(); client_cond.notify_all(); OnBufferAvailable(); } diff --git a/src/input/BufferingInputStream.hxx b/src/input/BufferingInputStream.hxx index 4f7a50607..061324142 100644 --- a/src/input/BufferingInputStream.hxx +++ b/src/input/BufferingInputStream.hxx @@ -61,7 +61,7 @@ class BufferingInputStream : InputStreamHandler { size_t seek_offset; - std::exception_ptr read_error, seek_error; + std::exception_ptr error, seek_error; static constexpr size_t INVALID_OFFSET = ~size_t(0);