From: Fred Morcos Date: Wed, 16 Oct 2024 13:28:02 +0000 (+0200) Subject: Cleanup struct index_on and index_on_function X-Git-Tag: rec-5.2.0-alpha1~26^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=048349a860ecb04e5d7a14067634686d25eb7432;p=thirdparty%2Fpdns.git Cleanup struct index_on and index_on_function --- diff --git a/ext/lmdb-safe/lmdb-typed.hh b/ext/lmdb-safe/lmdb-typed.hh index ebf52bd0f8..8d7519baeb 100644 --- a/ext/lmdb-safe/lmdb-typed.hh +++ b/ext/lmdb-safe/lmdb-typed.hh @@ -176,29 +176,31 @@ struct LMDBIndexOps /** This is an index on a field in a struct, it derives from the LMDBIndexOps */ -template +template struct index_on : LMDBIndexOps> { - index_on() : LMDBIndexOps>(this) + index_on() : + LMDBIndexOps>(this) {} - static Type getMember(const Class& c) + static Type getMember(const Class& klass) { - return c.*PtrToMember; + return klass.*PtrToMember; } using type = Type; }; /** This is a calculated index */ -template -struct index_on_function : LMDBIndexOps > +template +struct index_on_function : LMDBIndexOps> { - index_on_function() : LMDBIndexOps >(this) + index_on_function() : + LMDBIndexOps>(this) {} - static Type getMember(const Class& c) + static Type getMember(const Class& klass) { - Func f; - return f(c); + Func function; + return function(klass); } using type = Type;