]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Cleanup struct index_on and index_on_function
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 16 Oct 2024 13:28:02 +0000 (15:28 +0200)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 16 Oct 2024 13:57:48 +0000 (15:57 +0200)
ext/lmdb-safe/lmdb-typed.hh

index ebf52bd0f8c7c6fedb4d183f3449c4de2f763e87..8d7519baeb271e8cdc02e632a002392dd175aa12 100644 (file)
@@ -176,29 +176,31 @@ struct LMDBIndexOps
 
 /** This is an index on a field in a struct, it derives from the LMDBIndexOps */
 
-template<class Class,typename Type,Type Class::*PtrToMember>
+template <class Class, typename Type, Type Class::*PtrToMember>
 struct index_on : LMDBIndexOps<Class, Type, index_on<Class, Type, PtrToMember>>
 {
-  index_on() : LMDBIndexOps<Class, Type, index_on<Class, Type, PtrToMember>>(this)
+  index_on() :
+    LMDBIndexOps<Class, Type, index_on<Class, Type, PtrToMember>>(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<class Class, typename Type, class Func>
-struct index_on_function : LMDBIndexOps<Class, Type, index_on_function<Class, Type, Func> >
+template <class Class, typename Type, class Func>
+struct index_on_function : LMDBIndexOps<Class, Type, index_on_function<Class, Type, Func>>
 {
-  index_on_function() : LMDBIndexOps<Class, Type, index_on_function<Class, Type, Func> >(this)
+  index_on_function() :
+    LMDBIndexOps<Class, Type, index_on_function<Class, Type, Func>>(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;