From: Mikko Rasa Date: Sun, 31 Oct 2021 18:53:33 +0000 (+0200) Subject: Use plain function pointer instead of std::function X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=29cb6c5e97aa51c55fbe2691846bfbcec651f0a9;p=libs%2Fdatafile.git Use plain function pointer instead of std::function The lambda ended up having no captures, so this works. --- diff --git a/source/dynamicobjectloader.h b/source/dynamicobjectloader.h index ee1827b..9706c95 100644 --- a/source/dynamicobjectloader.h +++ b/source/dynamicobjectloader.h @@ -34,7 +34,7 @@ protected: T *object; private: Loader *obj_loader; - std::function store_func; + void (*store_func)(Collection &, const std::string &, T *); static ActionMap shared_actions; @@ -72,7 +72,8 @@ template DynamicObjectLoader::DynamicObjectLoader(Collection *c): coll(c), object(nullptr), - obj_loader(nullptr) + obj_loader(nullptr), + store_func(nullptr) { set_actions(shared_actions); }