mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +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
|
||||
|
||||
LMDB::LMDB(std::string name) :
|
||||
LMDB::LMDB(const std::string &name) :
|
||||
Collection(name), m_env(NULL), isOpen(false) {}
|
||||
|
||||
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
|
||||
return;
|
||||
#else
|
||||
|
@ -97,7 +97,7 @@ class MDBEnvProvider {
|
||||
class LMDB :
|
||||
public Collection {
|
||||
public:
|
||||
explicit LMDB(std::string name);
|
||||
explicit LMDB(const std::string &name);
|
||||
void store(std::string key, std::string value) override;
|
||||
|
||||
bool storeOrUpdateFirst(const std::string &key,
|
||||
@ -122,7 +122,7 @@ class LMDB :
|
||||
private:
|
||||
int txn_begin(unsigned int flags, MDB_txn **ret);
|
||||
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_dbi m_dbi;
|
||||
|
@ -68,7 +68,6 @@ uninitvar:src/operators/verify_svnr.cc:67
|
||||
functionConst:src/collection/backend/lmdb.h:86
|
||||
unusedLabel:src/collection/backend/lmdb.cc:297
|
||||
|
||||
passedByValue:src/collection/backend/lmdb.cc
|
||||
variableScope:src/operators/rx.cc
|
||||
variableScope:src/operators/rx_global.cc
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user