Skip to content

Commit 00c999b

Browse files
shewerhchunhui
authored andcommitted
fixed Segmentation.empty() and Composition.empty() to instance method( :empty() )
Signed-off-by: shewer <[email protected]>
1 parent 15dadfe commit 00c999b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/types.cc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,12 +283,16 @@ namespace SegmentationReg {
283283
t.Reset(length);
284284
}
285285

286+
bool empty(T &t){
287+
return t.empty();
288+
}
289+
286290
static const luaL_Reg funcs[] = {
287291
{ NULL, NULL },
288292
};
289293

290294
static const luaL_Reg methods[] = {
291-
{ "empty", WRAPMEM(T::empty) },
295+
{ "empty", WRAP(empty) },
292296
{ "back", WRAP(back) },
293297
{ "pop_back", WRAP(pop_back) },
294298
{ "reset_length", WRAP(reset_length) },
@@ -525,12 +529,16 @@ namespace CompositionReg {
525529
t.pop_back();
526530
}
527531

532+
bool empty(T &t){
533+
return t.empty();
534+
}
535+
528536
static const luaL_Reg funcs[] = {
529537
{ NULL, NULL },
530538
};
531539

532540
static const luaL_Reg methods[] = {
533-
{ "empty", WRAPMEM(T::empty) },
541+
{ "empty", WRAP(empty) },
534542
{ "back", WRAP(back) },
535543
{ "pop_back", WRAP(pop_back) },
536544
{ "push_back", WRAP(push_back) },

0 commit comments

Comments
 (0)