File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,12 @@ ParamValues async_postgres::array_to_params(GLua::ILuaInterface* lua,
45
45
46
46
auto type = lua->GetType (-1 );
47
47
if (type == GLua::Type::String) {
48
- auto value = get_string (lua, -1 );
49
- param.strings [i] = std::string (value.data (), value.size ());
48
+ param.strings [i] = get_string (lua, -1 );
50
49
param.values [i] = param.strings [i].c_str ();
51
- param.lengths [i] = value .length ();
50
+ param.lengths [i] = param. strings [i] .length ();
52
51
param.formats [i] = 1 ;
53
52
} else if (type == GLua::Type::Number) {
54
- param.strings [i] = std::to_string (lua-> GetNumber (- 1 ) );
53
+ param.strings [i] = get_string (lua, - 1 );
55
54
param.values [i] = param.strings [i].c_str ();
56
55
} else if (type == GLua::Type::Bool) {
57
56
param.values [i] = lua->GetBool (-1 ) ? " true" : " false" ;
You can’t perform that action at this time.
0 commit comments