From 14b5750ddb3bf0e5eaece70f64e174db3aa24939 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 14:26:36 +0000 Subject: [PATCH] Decompile 2 functions in Source/ActorPickNode.cpp Batch #12278 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_17906 CActorPickNode::`scalar deleting destructor': logic confirmed by peer review - fn_17909 CActorPickNode::Clear: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/ActorPickNode.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Source/ActorPickNode.cpp b/Source/ActorPickNode.cpp index 5965a501..397c9327 100644 --- a/Source/ActorPickNode.cpp +++ b/Source/ActorPickNode.cpp @@ -36,14 +36,7 @@ bool CPathFinder::Walkable(int column, int row) const { // OFFSET: 0x00ADA690 // FUNCTION: fn_17906 CActorPickNode::~CActorPickNode() { - for (ActorPickInfo* info : this->pickInfos) { - delete info; - } - this->pickInfos.clear(); - - for (CActorPickNode* child : this->children) { - delete child; - } + this->Clear(); } // OFFSET: 0x00AD9980 @@ -92,10 +85,10 @@ void CActorPickNode::AddPickInfo(ActorPickInfo* info) { // OFFSET: 0x00ADA850 // FUNCTION: fn_17909 void CActorPickNode::Clear() { - for (ActorPickInfo* info : this->pickInfos) { - delete info; + for (auto info = this->pickInfos.begin(); info != this->pickInfos.end(); ++info) { + delete *info; } - this->pickInfos.clear(); + this->pickInfos.erase(this->pickInfos.begin(), this->pickInfos.end()); for (CActorPickNode*& child : this->children) { if (child) {