From d20cf5f854fa5482c617d6ea355917435c98b038 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 31 Dec 2021 12:01:00 +0000 Subject: Allow glRef to accept lambdas --- lib/glRef.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/glRef.hpp') diff --git a/lib/glRef.hpp b/lib/glRef.hpp index 8596bd3..b33980d 100644 --- a/lib/glRef.hpp +++ b/lib/glRef.hpp @@ -4,9 +4,9 @@ #include #include -template class glRef { +template class glRef { public: - template explicit glRef(Args &&... args) : id {get(fixed..., std::forward(args)...)} + template explicit glRef(Args &&... args) : id {(*get)(fixed..., std::forward(args)...)} { if (!id) { throw std::runtime_error("Get function failed"); @@ -21,7 +21,7 @@ public: ~glRef() { if (id) { - release(id); + (*release)(id); } } -- cgit v1.2.3