Skip to content

Commit

Permalink
fixed Segmentation.empty() and Composition.empty() to instance method…
Browse files Browse the repository at this point in the history
…( :empty() )

Signed-off-by: shewer <shewer@gmail.com>
  • Loading branch information
shewer authored and hchunhui committed Jan 25, 2021
1 parent 15dadfe commit 00c999b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,16 @@ namespace SegmentationReg {
t.Reset(length);
}

bool empty(T &t){
return t.empty();
}

static const luaL_Reg funcs[] = {
{ NULL, NULL },
};

static const luaL_Reg methods[] = {
{ "empty", WRAPMEM(T::empty) },
{ "empty", WRAP(empty) },
{ "back", WRAP(back) },
{ "pop_back", WRAP(pop_back) },
{ "reset_length", WRAP(reset_length) },
Expand Down Expand Up @@ -525,12 +529,16 @@ namespace CompositionReg {
t.pop_back();
}

bool empty(T &t){
return t.empty();
}

static const luaL_Reg funcs[] = {
{ NULL, NULL },
};

static const luaL_Reg methods[] = {
{ "empty", WRAPMEM(T::empty) },
{ "empty", WRAP(empty) },
{ "back", WRAP(back) },
{ "pop_back", WRAP(pop_back) },
{ "push_back", WRAP(push_back) },
Expand Down

0 comments on commit 00c999b

Please sign in to comment.