Cosmetics: address cppcheck warnings

This commit is contained in:
Felipe Zimmerle
2020-01-27 18:11:08 -03:00
parent 68ef2dece3
commit fe98ce4c7d
53 changed files with 358 additions and 279 deletions

View File

@@ -39,7 +39,7 @@ namespace modsecurity {
namespace engine {
bool Lua::isCompatible(std::string script, Lua *l, std::string *error) {
bool Lua::isCompatible(const std::string &script, Lua *l, std::string *error) {
#ifdef WITH_LUA
std::string lua(".lua");
std::string err;
@@ -63,7 +63,7 @@ bool Lua::isCompatible(std::string script, Lua *l, std::string *error) {
}
bool Lua::load(std::string script, std::string *err) {
bool Lua::load(const std::string &script, std::string *err) {
#ifdef WITH_LUA
lua_State *L = NULL;
L = luaL_newstate();