Skip to content

Commit

Permalink
sqrat: add move ctor for Sqrat::Table
Browse files Browse the repository at this point in the history
Make sure we are avoiding refcounting stuff.
Just copy data and be done with it.
This might influence functionality too, since callign code might expect
e.g. moved-out Table to be null
  • Loading branch information
VasiliyRyabtsev committed Oct 30, 2024
1 parent 8c7d4f6 commit 229362c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sqrat/include/sqrat/sqratTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ class TableBase : public Object {
TableBase(const Object& obj) : Object(obj) {
}

TableBase(Object && obj) : Object(SQRAT_STD::move(obj)) {
}

TableBase(HSQOBJECT o, HSQUIRRELVM v) : Object(o, v) {
}

Expand Down Expand Up @@ -306,6 +309,9 @@ class Table : public TableBase {
Table(const Object& obj) : TableBase(obj) {
}

Table(Object && obj) : TableBase(SQRAT_STD::move(obj)) {
}

Table(HSQOBJECT o, HSQUIRRELVM v) : TableBase(o, v) {
}
};
Expand Down

0 comments on commit 229362c

Please sign in to comment.