mirror of
https://github.com/fmtlib/fmt.git
synced 2025-01-10 14:30:09 +00:00
Apply coding conventions
This commit is contained in:
parent
df62c86783
commit
62529aad19
@ -27,7 +27,7 @@ template <typename T> class optional {
|
|||||||
|
|
||||||
explicit operator bool() const { return has_value_; }
|
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");
|
if (!has_value_) throw std::runtime_error("bad optional access");
|
||||||
return value_;
|
return value_;
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ class scan_buffer {
|
|||||||
end_ = end;
|
end_ = end;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* ptr() const { return ptr_; }
|
auto ptr() const -> const char* { return ptr_; }
|
||||||
|
|
||||||
auto peek() -> int { return ptr_ != end_ ? *ptr_ : EOF; }
|
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<char>(c));
|
if (c != EOF) file_.unget(static_cast<char>(c));
|
||||||
buf = file_.buffer();
|
buf = file_.buffer();
|
||||||
}
|
}
|
||||||
this->set(buf.begin(), buf.end());
|
set(buf.begin(), buf.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
void consume() override {
|
void consume() override {
|
||||||
|
Loading…
Reference in New Issue
Block a user