summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/KingSystem/Utils/StrTreeMap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/KingSystem/Utils/StrTreeMap.h b/src/KingSystem/Utils/StrTreeMap.h
index 458e7eab..f333e74b 100644
--- a/src/KingSystem/Utils/StrTreeMap.h
+++ b/src/KingSystem/Utils/StrTreeMap.h
@@ -10,12 +10,12 @@ class StrTreeMapKey {
public:
StrTreeMapKey() = default;
StrTreeMapKey(u32 key_hash, const sead::SafeString& key) : mKeyHash(key_hash), mKey(key) {}
+ explicit StrTreeMapKey(const sead::SafeString& key)
+ : StrTreeMapKey(sead::HashCRC32::calcStringHash(key.cstr()), key) {}
const sead::SafeString& key() const { return mKey; }
- void setKey(const sead::SafeString& key) {
- *this = {sead::HashCRC32::calcStringHash(key.cstr()), key};
- }
+ void setKey(const sead::SafeString& key) { *this = StrTreeMapKey{key}; }
s32 compare(const StrTreeMapKey& rhs) const {
if (mKeyHash < rhs.mKeyHash)