summaryrefslogtreecommitdiff
path: root/include/JSystem/JParticle/JPAList.h
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2026-05-07 21:23:47 +0200
committerGitHub <noreply@github.com>2026-05-07 21:23:47 +0200
commitf7b4c029fd5176e817e3de7209727480c445a3d2 (patch)
tree9cddc9fa36ec13e7dac76c54d74257c61fe20b47 /include/JSystem/JParticle/JPAList.h
parentddb116187922a3f73ae3c97a136f499b7d724a2c (diff)
parentf4d163797f3c21e5a705b75043e0a8fbe7dc2460 (diff)
Merge pull request #313 from robojumper/vec-mtx-cleanup
Cleanup
Diffstat (limited to 'include/JSystem/JParticle/JPAList.h')
-rw-r--r--include/JSystem/JParticle/JPAList.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/JSystem/JParticle/JPAList.h b/include/JSystem/JParticle/JPAList.h
index 287fdb75..e4583b4c 100644
--- a/include/JSystem/JParticle/JPAList.h
+++ b/include/JSystem/JParticle/JPAList.h
@@ -12,8 +12,8 @@ struct JPANode {
JPANode() : mpPrev(NULL), mpNext(NULL) {
}
~JPANode() {}
- JPANode<T>* getPrev() { return mpPrev; }
- JPANode<T>* getNext() { return mpNext; }
+ JPANode<T>* getPrev() const { return mpPrev; }
+ JPANode<T>* getNext() const { return mpNext; }
T* getObject() { return &mData; }
/* 0x00 */ JPANode<T>* mpPrev;
@@ -48,8 +48,7 @@ struct JPAList {
} else {
mpLast = node;
mpFirst = node;
- node->mpPrev = NULL;
- node->mpNext = NULL;
+ node->mpNext = node->mpPrev = NULL;
}
mNum++;
@@ -75,8 +74,7 @@ struct JPAList {
if (mNum == 1) {
ret = mpFirst;
- mpLast = NULL;
- mpFirst = NULL;
+ mpFirst = mpLast = NULL;
mNum--;
} else if (mNum) {
ret = mpFirst;
@@ -93,8 +91,7 @@ struct JPAList {
if (mNum == 1) {
ret = mpLast;
- mpLast = NULL;
- mpFirst = NULL;
+ mpFirst = mpLast = NULL;
mNum--;
} else if (mNum) {
ret = mpLast;
@@ -120,8 +117,7 @@ struct JPAList {
mpLast = node->mpPrev;
mNum--;
} else {
- mpLast = NULL;
- mpFirst = NULL;
+ mpFirst = mpLast = NULL;
mNum--;
}
return node;