From 6f0ded7ab5119b593f5c6cec310abe0eec23a636 Mon Sep 17 00:00:00 2001 From: Curio Yang Date: Tue, 30 Apr 2024 17:04:39 +0800 Subject: [PATCH] fix build --- .../include/nncase/runtime/char_array_buffer.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Native/include/nncase/runtime/char_array_buffer.h b/src/Native/include/nncase/runtime/char_array_buffer.h index 09aa8b410..8dde31b6d 100644 --- a/src/Native/include/nncase/runtime/char_array_buffer.h +++ b/src/Native/include/nncase/runtime/char_array_buffer.h @@ -24,21 +24,21 @@ class char_array_buffer : public std::streambuf { : begin_(data.begin()), end_(data.end()), current_(data.data()) {} private: - int_type underflow() { + int_type underflow() override { if (current_ == end_) return traits_type::eof(); return traits_type::to_int_type(*current_); } - int_type uflow() { + int_type uflow() override { if (current_ == end_) return traits_type::eof(); return traits_type::to_int_type(*current_++); } - int_type pbackfail(int_type ch) { + int_type pbackfail(int_type ch) override { if (current_ == begin_ || (ch != traits_type::eof() && ch != current_[-1])) return traits_type::eof(); @@ -46,13 +46,14 @@ class char_array_buffer : public std::streambuf { return traits_type::to_int_type(*--current_); } - std::streamsize showmanyc() { + std::streamsize showmanyc() override { assert(std::less_equal()(current_, end_)); return end_ - current_; } - std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, - [[maybe_unused]] std::ios_base::openmode which) { + std::streampos + seekoff(std::streamoff off, std::ios_base::seekdir way, + [[maybe_unused]] std::ios_base::openmode which) override { if (way == std::ios_base::beg) { current_ = begin_ + off; } else if (way == std::ios_base::cur) { @@ -67,8 +68,9 @@ class char_array_buffer : public std::streambuf { return current_ - begin_; } - std::streampos seekpos(std::streampos sp, - [[maybe_unused]] std::ios_base::openmode which) { + std::streampos + seekpos(std::streampos sp, + [[maybe_unused]] std::ios_base::openmode which) override { current_ = begin_ + sp; if (current_ < begin_ || current_ > end_)