summaryrefslogtreecommitdiff
path: root/src/KingSystem/ActorSystem/actInfoData.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-11-16 20:44:05 +0100
committerLéo Lam <leo@leolam.fr>2020-11-16 20:44:20 +0100
commitb0498a15bf6f1782f1429ffbd0b03c187f61d7c9 (patch)
treef3ecad9b483c8a5f3dea0191d8495d79549b9de5 /src/KingSystem/ActorSystem/actInfoData.cpp
parent9ee0c750f2e7e55de9f53e39c3609106a35cbabd (diff)
ksys/act: Fix one matching issue
Diffstat (limited to 'src/KingSystem/ActorSystem/actInfoData.cpp')
-rw-r--r--src/KingSystem/ActorSystem/actInfoData.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/KingSystem/ActorSystem/actInfoData.cpp b/src/KingSystem/ActorSystem/actInfoData.cpp
index 036ab557..54499e40 100644
--- a/src/KingSystem/ActorSystem/actInfoData.cpp
+++ b/src/KingSystem/ActorSystem/actInfoData.cpp
@@ -193,19 +193,20 @@ void InfoData::getHomeAreas(const char* actor, HomeAreas& info) const {
}
}
-// NON_MATCHING: stack
const char* InfoData::getSameGroupActorName(const char* actor) const {
al::ByamlIter iter;
- if (getActorIter(&iter, actor, false)) {
- al::ByamlHashIter hash_iter{iter.getRootNode()};
- al::ByamlData data;
- if (hash_iter.getDataByKey(&data, mSystemSameGroupActorNameIdx)) {
- const char* name;
- if (iter.tryConvertString(&name, &data))
- return name;
+ return [&] {
+ if (getActorIter(&iter, actor, false)) {
+ al::ByamlHashIter hash_iter{iter.getRootNode()};
+ al::ByamlData data;
+ if (hash_iter.getDataByKey(&data, mSystemSameGroupActorNameIdx)) {
+ const char* name;
+ if (iter.tryConvertString(&name, &data))
+ return name;
+ }
}
- }
- return sead::SafeString::cEmptyString.cstr();
+ return sead::SafeString::cEmptyString.cstr();
+ }();
}
const char* InfoData::getString(const char* actor, const char* key,