added const qualifiers where I saw fit

This commit is contained in:
Kjistóf 2016-11-27 14:30:42 +01:00
parent d452d6ce79
commit a037369c39

View File

@ -14,7 +14,7 @@ private:
class callable_base class callable_base
{ {
public: public:
virtual Ret call(Args...) = 0; virtual Ret call(Args...) const = 0;
virtual ~callable_base() {} virtual ~callable_base() {}
//virtual ~callable_base() = default; // melyik számít szebbnek? van bármi különbség? //virtual ~callable_base() = default; // melyik számít szebbnek? van bármi különbség?
}; };
@ -27,7 +27,7 @@ private:
public: public:
callable(Fun fun):_fun(fun) {} callable(Fun fun):_fun(fun) {}
virtual Ret call(Args... args) override virtual Ret call(Args... args) const override
{ return _fun(std::forward<Args>(args)...); } { return _fun(std::forward<Args>(args)...); }
virtual ~callable() override {} virtual ~callable() override {}