mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Change some parms to reference-to-const to satisfy cppcheck
This commit is contained in:
parent
da8782ce72
commit
2121938c51
@ -37,7 +37,7 @@ namespace backend {
|
|||||||
|
|
||||||
#ifdef WITH_LMDB
|
#ifdef WITH_LMDB
|
||||||
|
|
||||||
LMDB::LMDB(std::string name) :
|
LMDB::LMDB(const std::string &name) :
|
||||||
Collection(name), m_env(NULL), isOpen(false) {}
|
Collection(name), m_env(NULL), isOpen(false) {}
|
||||||
|
|
||||||
int LMDB::txn_begin(unsigned int flags, MDB_txn **ret) {
|
int LMDB::txn_begin(unsigned int flags, MDB_txn **ret) {
|
||||||
@ -60,7 +60,7 @@ void LMDB::string2val(const std::string& str, MDB_val *val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LMDB::lmdb_debug(int rc, std::string op, std::string scope) {
|
void LMDB::lmdb_debug(int rc, const std::string &op, const std::string &scope) {
|
||||||
#ifndef LMDB_STDOUT_COUT
|
#ifndef LMDB_STDOUT_COUT
|
||||||
return;
|
return;
|
||||||
#else
|
#else
|
||||||
|
@ -97,7 +97,7 @@ class MDBEnvProvider {
|
|||||||
class LMDB :
|
class LMDB :
|
||||||
public Collection {
|
public Collection {
|
||||||
public:
|
public:
|
||||||
explicit LMDB(std::string name);
|
explicit LMDB(const std::string &name);
|
||||||
void store(std::string key, std::string value) override;
|
void store(std::string key, std::string value) override;
|
||||||
|
|
||||||
bool storeOrUpdateFirst(const std::string &key,
|
bool storeOrUpdateFirst(const std::string &key,
|
||||||
@ -122,7 +122,7 @@ class LMDB :
|
|||||||
private:
|
private:
|
||||||
int txn_begin(unsigned int flags, MDB_txn **ret);
|
int txn_begin(unsigned int flags, MDB_txn **ret);
|
||||||
void string2val(const std::string& str, MDB_val *val);
|
void string2val(const std::string& str, MDB_val *val);
|
||||||
void inline lmdb_debug(int rc, std::string op, std::string scope);
|
void inline lmdb_debug(int rc, const std::string &op, const std::string &scope);
|
||||||
|
|
||||||
MDB_env *m_env;
|
MDB_env *m_env;
|
||||||
MDB_dbi m_dbi;
|
MDB_dbi m_dbi;
|
||||||
|
@ -68,7 +68,6 @@ uninitvar:src/operators/verify_svnr.cc:67
|
|||||||
functionConst:src/collection/backend/lmdb.h:86
|
functionConst:src/collection/backend/lmdb.h:86
|
||||||
unusedLabel:src/collection/backend/lmdb.cc:297
|
unusedLabel:src/collection/backend/lmdb.cc:297
|
||||||
|
|
||||||
passedByValue:src/collection/backend/lmdb.cc
|
|
||||||
variableScope:src/operators/rx.cc
|
variableScope:src/operators/rx.cc
|
||||||
variableScope:src/operators/rx_global.cc
|
variableScope:src/operators/rx_global.cc
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user