summaryrefslogtreecommitdiff
path: root/src/KingSystem/Event/evtOrderParam.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-02-07 16:33:31 +0100
committerLéo Lam <leo@leolam.fr>2021-02-07 16:44:39 +0100
commitdb6d210a5389e3113504dbe870a6db3ea9a43fc4 (patch)
tree543a8882efe97a5d6d5f253044d8e8079a820817 /src/KingSystem/Event/evtOrderParam.cpp
parent9d81c0645f8e800d380a5352c5027824073f0d6c (diff)
ksys/evt: Fix some function signatures
Diffstat (limited to 'src/KingSystem/Event/evtOrderParam.cpp')
-rw-r--r--src/KingSystem/Event/evtOrderParam.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/KingSystem/Event/evtOrderParam.cpp b/src/KingSystem/Event/evtOrderParam.cpp
index 30ff8211..1168fa2d 100644
--- a/src/KingSystem/Event/evtOrderParam.cpp
+++ b/src/KingSystem/Event/evtOrderParam.cpp
@@ -1,5 +1,4 @@
#include "KingSystem/Event/evtOrderParam.h"
-#include <basis/seadTypes.h>
#include <codec/seadHashCRC32.h>
#include <container/seadBuffer.h>
#include <heap/seadExpHeap.h>
@@ -8,7 +7,7 @@
namespace ksys::evt {
-OrderParam::OrderParam(sead::ExpHeap* heap) {
+OrderParam::OrderParam(sead::Heap* heap) {
mHeap = heap;
}
@@ -77,26 +76,28 @@ const OrderParamEntry* OrderParam::getParam(const s32 index) const {
sead::FixedSafeString<0x100> error_message;
error_message.format("[%s] getParam(%d) is failed.", "ksys::evt::OrderParam", index);
- if ((u32)std::max(0, mEntries.size()) > (u32)index) {
+ if (u32(std::max(0, mEntries.size())) > u32(index)) {
return &mEntries[index];
} else {
return nullptr;
}
}
-OrderParam* OrderParam::assign(OrderParam* other) {
- if (this != other) {
+
+OrderParam& OrderParam::operator=(const OrderParam& other) {
+ if (this != &other) {
doAssign(other);
}
- return this;
+ return *this;
}
-bool OrderParam::doAssign(OrderParam* other) {
- if (this == other)
+bool OrderParam::doAssign(const OrderParam& other) {
+ if (this == &other)
return true;
- if (!initialize(std::max(0, other->mEntries.size())))
+
+ if (!initialize(std::max(0, other.mEntries.size())))
return false;
for (s32 i = 0; i < mEntries.size(); i++) {
- auto* other_entry = other->getParam(i);
+ auto* other_entry = other.getParam(i);
if (other_entry) {
auto* other_ptr = other_entry->data;
auto* other_name = other_entry->name;