summaryrefslogtreecommitdiff
path: root/include/JSystem/JSupport
diff options
context:
space:
mode:
authorunknown <pheenoh@gmail.com>2020-12-01 19:04:35 -0500
committerunknown <pheenoh@gmail.com>2020-12-01 19:04:35 -0500
commit91fc5f6f532817dca0763a6e7841ce2a75ecb54d (patch)
treedb6b63a24336b6d767ec12a195cda6520e8d77e9 /include/JSystem/JSupport
parent1ded84de460526448c0a2f5ffc5c651f4119d21b (diff)
parentac6b191dc19ddd1f155b55890953b7564c6f7b74 (diff)
Merge branch 'master' of https://github.com/zeldaret/tp
Diffstat (limited to 'include/JSystem/JSupport')
-rw-r--r--include/JSystem/JSupport/JSUList/JSUList.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/include/JSystem/JSupport/JSUList/JSUList.h b/include/JSystem/JSupport/JSUList/JSUList.h
index c0b145f223..eb57f70984 100644
--- a/include/JSystem/JSupport/JSUList/JSUList.h
+++ b/include/JSystem/JSupport/JSUList/JSUList.h
@@ -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