summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit/Function.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/NeKit/Function.h')
-rw-r--r--src/kernel/NeKit/Function.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/kernel/NeKit/Function.h b/src/kernel/NeKit/Function.h
index 2889e055..f7e47973 100644
--- a/src/kernel/NeKit/Function.h
+++ b/src/kernel/NeKit/Function.h
@@ -16,25 +16,21 @@ namespace Kernel {
template <typename T, typename... Args>
class Function final {
public:
- Function() = delete;
+ Function() = delete;
Function(nullPtr) = delete;
- ~Function() = default;
+ ~Function() = default;
explicit Function(T (*Fn)(Args... args)) : fFn(Fn) { MUST_PASS(fFn); }
Function& operator=(const Function&) = delete;
Function(const Function&) = delete;
- T operator()(Args&&... args) {
- return fFn(args...);
- }
+ T operator()(Args&&... args) { return fFn(args...); }
- T Call(Args&&... args) {
- return fFn(args...);
- }
+ T Call(Args&&... args) { return fFn(args...); }
explicit operator bool() { return fFn; }
- bool operator!() { return !fFn; }
+ bool operator!() { return !fFn; }
private:
T (*fFn)(Args... args){nullptr};