We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a192be commit 121cc0aCopy full SHA for 121cc0a
1 file changed
source/util.cpp
@@ -45,13 +45,12 @@ ParamValues async_postgres::array_to_params(GLua::ILuaInterface* lua,
45
46
auto type = lua->GetType(-1);
47
if (type == GLua::Type::String) {
48
- auto value = get_string(lua, -1);
49
- param.strings[i] = std::string(value.data(), value.size());
+ param.strings[i] = get_string(lua, -1);
50
param.values[i] = param.strings[i].c_str();
51
- param.lengths[i] = value.length();
+ param.lengths[i] = param.strings[i].length();
52
param.formats[i] = 1;
53
} else if (type == GLua::Type::Number) {
54
- param.strings[i] = std::to_string(lua->GetNumber(-1));
55
56
} else if (type == GLua::Type::Bool) {
57
param.values[i] = lua->GetBool(-1) ? "true" : "false";
0 commit comments