From: Mikko Rasa Date: Thu, 7 Oct 2021 12:47:09 +0000 (+0300) Subject: Remove unnecessary capture from a lambda X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=6e78ca102c93c2bab2f8f68f71879baf40225a78;p=libs%2Fdatafile.git Remove unnecessary capture from a lambda --- diff --git a/source/dynamicobjectloader.h b/source/dynamicobjectloader.h index 726d19c..e29633d 100644 --- a/source/dynamicobjectloader.h +++ b/source/dynamicobjectloader.h @@ -128,7 +128,7 @@ void DynamicObjectLoader::CreateObject::operator()(const std::string &, ldr.object = obj; ldr.obj_loader = ldr.create_object_loader(*obj); ldr.add_auxiliary_loader(*ldr.obj_loader); - ldr.store_func = [&ldr](Collection &c, const std::string &n, T *o){ c.add(n, static_cast(o)); }; + ldr.store_func = [](Collection &c, const std::string &n, T *o){ c.add(n, static_cast(o)); }; } } // namespace DataFile