From ecb4a20f85326d625c195ca6cce8b40d442abfe4 Mon Sep 17 00:00:00 2001 From: korenkonder Date: Mon, 24 Apr 2023 22:26:43 +0300 Subject: [PATCH] Another rework --- src/CRE/auth_3d.hpp | 12 ++++++------ src/CRE/rob/rob.cpp | 6 +++--- src/KKdLib/prj/vector_pair.hpp | 4 ++-- src/KKdLib/prj/vector_pair_combine.hpp | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/CRE/auth_3d.hpp b/src/CRE/auth_3d.hpp index ab9bd59e..61b87160 100644 --- a/src/CRE/auth_3d.hpp +++ b/src/CRE/auth_3d.hpp @@ -850,27 +850,27 @@ struct auth_3d_id { }; inline bool operator >(const auth_3d_id& left, const auth_3d_id& right) { - return *(uint32_t*)&left > *(uint32_t*)&right; + return left.id > right.id; } inline bool operator <(const auth_3d_id& left, const auth_3d_id& right) { - return *(uint32_t*)&left < *(uint32_t*)&right; + return left.id < right.id; } inline bool operator >=(const auth_3d_id& left, const auth_3d_id& right) { - return *(uint32_t*)&left >= *(uint32_t*)&right; + return left.id >= right.id; } inline bool operator <=(const auth_3d_id& left, const auth_3d_id& right) { - return *(uint32_t*)&left <= *(uint32_t*)&right; + return left.id <= right.id; } inline bool operator ==(const auth_3d_id& left, const auth_3d_id& right) { - return *(uint32_t*)&left == *(uint32_t*)&right; + return left.id == right.id; } inline bool operator !=(const auth_3d_id& left, const auth_3d_id& right) { - return *(uint32_t*)&left != *(uint32_t*)&right; + return left.id != right.id; } struct auth_3d { diff --git a/src/CRE/rob/rob.cpp b/src/CRE/rob/rob.cpp index 6438cffd..21ae630d 100644 --- a/src/CRE/rob/rob.cpp +++ b/src/CRE/rob/rob.cpp @@ -12689,9 +12689,9 @@ bool rob_chara_item_equip_object::set_boc( || i.st_node + 1ULL >= j->rob.nodes.size()) continue; - RobOsageNode* v17 = rob_osg->GetNode(i.ed_node + 1LL); - RobOsageNode* v18 = j->rob.GetNode(i.st_node + 1LL); - v17->data_ptr->boc.push_back(v18); + RobOsageNode* ed_node = rob_osg->GetNode(i.ed_node + 1ULL); + RobOsageNode* st_node = j->rob.GetNode(i.st_node + 1ULL); + ed_node->data_ptr->boc.push_back(st_node); v6 = true; break; } diff --git a/src/KKdLib/prj/vector_pair.hpp b/src/KKdLib/prj/vector_pair.hpp index 7a3751de..885f49a2 100644 --- a/src/KKdLib/prj/vector_pair.hpp +++ b/src/KKdLib/prj/vector_pair.hpp @@ -47,7 +47,7 @@ namespace prj { unique(); } - inline typename auto find(T& key) { + inline typename auto find(const T& key) { auto k = this->begin(); size_t l = this->size(); size_t temp; @@ -64,7 +64,7 @@ namespace prj { return k; } - inline typename auto find(T& key) const { + inline typename auto find(const T& key) const { auto k = this->begin(); size_t l = this->size(); size_t temp; diff --git a/src/KKdLib/prj/vector_pair_combine.hpp b/src/KKdLib/prj/vector_pair_combine.hpp index ae06a3dc..9f3220b5 100644 --- a/src/KKdLib/prj/vector_pair_combine.hpp +++ b/src/KKdLib/prj/vector_pair_combine.hpp @@ -21,7 +21,7 @@ namespace prj { std::vector data; std::vector new_data; - inline auto find(T& key) { + inline auto find(const T& key) { auto k = data.begin(); size_t l = data.size(); size_t temp;