1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-23 01:47:39 +00:00

Add explicit and override consistently everywhere else. NFCI.

This commit is contained in:
Arthur O'Dwyer
2021-07-11 18:03:08 -04:00
parent a2989a3d39
commit 090e084dd4
6 changed files with 79 additions and 80 deletions

View File

@@ -19,10 +19,10 @@ template<class T, class R, class... Args>
struct function_state : function_state_base<R, Args...> {
T t_;
explicit function_state(T t) : t_(std::move(t)) {}
R call(Args... args) const /*override*/ {
R call(Args... args) const override {
return const_cast<T&>(t_)(static_cast<Args&&>(args)...);
}
function_state_base<R, Args...> *clone() const /*override*/ {
function_state_base<R, Args...> *clone() const override {
return new function_state(*this);
}
};