diff options
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r-- | src/subway_map.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 5c99567..c7b2c8a 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <wx/dcbuffer.h> | 3 | #include <wx/dcbuffer.h> |
4 | #include <wx/dcgraph.h> | 4 | #include <wx/dcgraph.h> |
5 | 5 | ||
6 | #include <fmt/core.h> | ||
6 | #include <sstream> | 7 | #include <sstream> |
7 | 8 | ||
8 | #include "ap_state.h" | 9 | #include "ap_state.h" |
@@ -85,10 +86,8 @@ void SubwayMap::OnConnect() { | |||
85 | 86 | ||
86 | if (!AP_IsSunwarpShuffle() && subway_item.sunwarp && | 87 | if (!AP_IsSunwarpShuffle() && subway_item.sunwarp && |
87 | subway_item.sunwarp->type != SubwaySunwarpType::kFinal) { | 88 | subway_item.sunwarp->type != SubwaySunwarpType::kFinal) { |
88 | std::ostringstream tag; | 89 | std::string tag = fmt::format("subway{}", subway_item.sunwarp->dots); |
89 | tag << "sunwarp" << subway_item.sunwarp->dots; | 90 | tagged[tag].push_back(subway_item.id); |
90 | |||
91 | tagged[tag.str()].push_back(subway_item.id); | ||
92 | } | 91 | } |
93 | 92 | ||
94 | if (!AP_IsPilgrimageEnabled() && | 93 | if (!AP_IsPilgrimageEnabled() && |
@@ -100,8 +99,7 @@ void SubwayMap::OnConnect() { | |||
100 | 99 | ||
101 | if (AP_IsSunwarpShuffle()) { | 100 | if (AP_IsSunwarpShuffle()) { |
102 | for (const auto &[index, mapping] : AP_GetSunwarpMapping()) { | 101 | for (const auto &[index, mapping] : AP_GetSunwarpMapping()) { |
103 | std::ostringstream tag; | 102 | std::string tag = fmt::format("sunwarp{}", mapping.dots); |
104 | tag << "sunwarp" << mapping.dots; | ||
105 | 103 | ||
106 | SubwaySunwarp fromWarp; | 104 | SubwaySunwarp fromWarp; |
107 | if (index < 6) { | 105 | if (index < 6) { |
@@ -121,8 +119,8 @@ void SubwayMap::OnConnect() { | |||
121 | toWarp.type = SubwaySunwarpType::kExit; | 119 | toWarp.type = SubwaySunwarpType::kExit; |
122 | } | 120 | } |
123 | 121 | ||
124 | tagged[tag.str()].push_back(GD_GetSubwayItemForSunwarp(fromWarp)); | 122 | tagged[tag].push_back(GD_GetSubwayItemForSunwarp(fromWarp)); |
125 | tagged[tag.str()].push_back(GD_GetSubwayItemForSunwarp(toWarp)); | 123 | tagged[tag].push_back(GD_GetSubwayItemForSunwarp(toWarp)); |
126 | } | 124 | } |
127 | } | 125 | } |
128 | 126 | ||