]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
LMDB: Initialize values in the init list to make cppcheck happy
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 24 Oct 2019 08:32:55 +0000 (10:32 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 24 Oct 2019 08:32:55 +0000 (10:32 +0200)
ext/lmdb-safe/lmdb-safe.hh

index 9b658741b4e11702112e16b902fbb0c8a5c9f0f5..66aae7e5030887b12476f8f72b8b1cd3d75bb73a 100644 (file)
@@ -43,9 +43,8 @@ The error strategy. Anything that "should never happen" turns into an exception.
 class MDBDbi
 {
 public:
-  MDBDbi()
+  MDBDbi(): d_dbi(-1)
   {
-    d_dbi = -1;
   }
   explicit MDBDbi(MDB_env* env, MDB_txn* txn, string_view dbname, int flags);  
 
@@ -151,9 +150,8 @@ template<> inline string_view MDBOutVal::get<string_view>() const
 class MDBInVal
 {
 public:
-  MDBInVal(const MDBOutVal& rhs)
+  MDBInVal(const MDBOutVal& rhs): d_mdbval(rhs.d_mdbval)
   {
-    d_mdbval = rhs.d_mdbval;
   }
 
   template <class T,