mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Improved handling of virtual inheritance. (#7)
* new system for handling vtables * commented out non-matching JKRDisposer::~JKDisposer() * removed artificial vtables and matched simple virtual-call functions * better text on nonmatching functions * reverted asmdiff.sh * attempt 2 * Spelling * banner and .gitignore for vtable artifacts * move virtual function to the correct class * remove unnecessary casts
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
class JSUPtrList;
|
||||
class JSUPtrLink {
|
||||
public:
|
||||
JSUPtrLink(void*);
|
||||
JSUPtrLink(void* owner);
|
||||
~JSUPtrLink();
|
||||
|
||||
public:
|
||||
void* unk0;
|
||||
void* owner;
|
||||
JSUPtrList* list;
|
||||
JSUPtrLink* prev;
|
||||
JSUPtrLink* next;
|
||||
@@ -35,13 +35,24 @@ class JSUPtrList {
|
||||
u32 length;
|
||||
};
|
||||
|
||||
|
||||
template <typename T>
|
||||
class JSUList : JSUPtrList {
|
||||
public:
|
||||
JSUList() : JSUPtrList(true) {}
|
||||
~JSUList() {};
|
||||
JSUList() : JSUPtrList(true) {
|
||||
}
|
||||
~JSUList(){};
|
||||
|
||||
void append(T* value) {
|
||||
list.append(&value->ptr_link);
|
||||
}
|
||||
|
||||
void prepend(T* value) {
|
||||
list.prepend(&value->ptr_link);
|
||||
}
|
||||
|
||||
void remove(T* value) {
|
||||
list.remove(&value->ptr_link);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user