diff options
| author | Alexander Gavrilov | 2012-03-24 12:43:53 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-03-24 12:43:53 +0400 |
| commit | 053bfe345c566864b2337a8429072a24a2558493 (patch) | |
| tree | fdebeeb5241140536eafad23f1da54f91e338862 /library/DataDefs.cpp | |
| parent | 7fe5fc9a906710bc603bf93b3e282872990a3361 (diff) | |
| download | dfhack-053bfe345c566864b2337a8429072a24a2558493.tar.gz dfhack-053bfe345c566864b2337a8429072a24a2558493.tar.bz2 dfhack-053bfe345c566864b2337a8429072a24a2558493.tar.xz | |
Implement allocation and copy for c++ objects in the lua wrapper.
Diffstat (limited to 'library/DataDefs.cpp')
| -rw-r--r-- | library/DataDefs.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/DataDefs.cpp b/library/DataDefs.cpp index 6fcd1141..712d4563 100644 --- a/library/DataDefs.cpp +++ b/library/DataDefs.cpp @@ -164,6 +164,9 @@ void struct_identity::doInit(Core *core) bool struct_identity::is_subclass(struct_identity *actual) { + if (!has_children && actual != this) + return false; + for (; actual; actual = actual->getParent()) if (actual == this) return true; |
