From f7ae271a2b13948fab42c296cc2bd046e55d9ccc Mon Sep 17 00:00:00 2001 From: status102 <102887808+status102@users.noreply.github.com> Date: Mon, 16 Mar 2026 21:01:39 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9C=B0=E5=9B=BE=E5=90=8D=E6=9F=A5?= =?UTF-8?q?=E6=89=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3rdparty/include/Arknights-Tile-Pos/TileDef.hpp | 6 +++--- src/MaaCore/Config/Miscellaneous/TilePack.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/3rdparty/include/Arknights-Tile-Pos/TileDef.hpp b/3rdparty/include/Arknights-Tile-Pos/TileDef.hpp index 5f496855e1..31dbc632e7 100644 --- a/3rdparty/include/Arknights-Tile-Pos/TileDef.hpp +++ b/3rdparty/include/Arknights-Tile-Pos/TileDef.hpp @@ -23,10 +23,10 @@ struct LevelKey } matched = true; } - return true; + return true; // ignore this property if rhs is empty } - bool operator==(const LevelKey& other) const noexcept + bool match(const LevelKey& other) const noexcept { bool has_non_empty_match = false; return check_and_track(stageId, other.stageId, has_non_empty_match) && @@ -35,7 +35,7 @@ struct LevelKey check_and_track(name, other.name, has_non_empty_match) && has_non_empty_match; } - bool operator==(const std::string& any_key) const noexcept + bool match(const std::string& any_key) const noexcept { if (any_key.empty()) { return false; diff --git a/src/MaaCore/Config/Miscellaneous/TilePack.h b/src/MaaCore/Config/Miscellaneous/TilePack.h index 74ae5f7cf5..d792833b9c 100644 --- a/src/MaaCore/Config/Miscellaneous/TilePack.h +++ b/src/MaaCore/Config/Miscellaneous/TilePack.h @@ -71,7 +71,7 @@ public: std::optional find(const KeyT& key) const { for (const auto& pair : m_summarize) { - if (pair.first == key) { + if (pair.first.match(key)) { return pair; } }