From 62529aad1982dbc47551619f472a9ffb4dff3e4c Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Mon, 25 Dec 2023 10:16:55 -0800 Subject: [PATCH] Apply coding conventions --- test/scan.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/scan.h b/test/scan.h index 9b6f5d6b..9ea3f48e 100644 --- a/test/scan.h +++ b/test/scan.h @@ -27,7 +27,7 @@ template class optional { explicit operator bool() const { return has_value_; } - const T& operator*() const { + auto operator*() const -> const T& { if (!has_value_) throw std::runtime_error("bad optional access"); return value_; } @@ -58,7 +58,7 @@ class scan_buffer { end_ = end; } - const char* ptr() const { return ptr_; } + auto ptr() const -> const char* { return ptr_; } auto peek() -> int { return ptr_ != end_ ? *ptr_ : EOF; } @@ -252,7 +252,7 @@ class file_scan_buffer : public scan_buffer { if (c != EOF) file_.unget(static_cast(c)); buf = file_.buffer(); } - this->set(buf.begin(), buf.end()); + set(buf.begin(), buf.end()); } void consume() override {