diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-14 13:02:13 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-14 13:02:13 -0400 |
commit | c1de3fe969a686dbe1d17bdd3dfe7e9d4251f17b (patch) | |
tree | cd226312173a12998528a83fbd4b1b613124febc /src/game_data.cpp | |
parent | bee4194f9e12c9d2210a5ecba7249bdfe3f3deda (diff) | |
download | lingo-ap-tracker-c1de3fe969a686dbe1d17bdd3dfe7e9d4251f17b.tar.gz lingo-ap-tracker-c1de3fe969a686dbe1d17bdd3dfe7e9d4251f17b.tar.bz2 lingo-ap-tracker-c1de3fe969a686dbe1d17bdd3dfe7e9d4251f17b.zip |
Warn on singleton subway tag data
Diffstat (limited to 'src/game_data.cpp')
-rw-r--r-- | src/game_data.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game_data.cpp b/src/game_data.cpp index 7bc3134..8af57e5 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp | |||
@@ -651,6 +651,20 @@ struct GameData { | |||
651 | 651 | ||
652 | subway_items_.push_back(subway_item); | 652 | subway_items_.push_back(subway_item); |
653 | } | 653 | } |
654 | |||
655 | // Find singleton subway tags. | ||
656 | std::map<std::string, std::set<int>> subway_tags; | ||
657 | for (const SubwayItem &subway_item : subway_items_) { | ||
658 | for (const std::string &tag : subway_item.tags) { | ||
659 | subway_tags[tag].insert(subway_item.id); | ||
660 | } | ||
661 | } | ||
662 | |||
663 | for (const auto &[tag, items] : subway_tags) { | ||
664 | if (items.size() == 1) { | ||
665 | wxLogWarning("Singleton subway item tag: %s", tag); | ||
666 | } | ||
667 | } | ||
654 | } | 668 | } |
655 | 669 | ||
656 | int AddOrGetRoom(std::string room) { | 670 | int AddOrGetRoom(std::string room) { |