Decompile fn_19420 (FindNaviObjectByName)
Batch #11948 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_19420 FindNaviObjectByName: logic confirmed by peer review Peer-reviewed-by: KWDev, SapitoSucio, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
bbb4d89f3e
commit
01e049c494
1 changed files with 5 additions and 3 deletions
|
|
@ -13,9 +13,11 @@
|
|||
// OFFSET: 0x00B8C0B0
|
||||
// FUNCTION: fn_19420
|
||||
__declspec(noinline) CNavi_Object* FindNaviObjectByName(const char* name, const std::vector<CNavi_Object*>& objects) {
|
||||
for (CNavi_Object* object : objects) {
|
||||
if (name && std::string(name) == object->name) {
|
||||
return object;
|
||||
for (std::vector<CNavi_Object*>::const_iterator it = objects.begin(); it != objects.end(); ++it) {
|
||||
if (name) {
|
||||
if ((*it)->name == std::string(name)) {
|
||||
return *it;
|
||||
}
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue