diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-10 19:13:22 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-06-10 19:13:22 -0400 |
commit | 33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea (patch) | |
tree | b1db5d3e83ccd8c5219d5db12b01bc3d152b79d1 /src/subway_map.cpp | |
parent | 3b3c3ca4ed98c8d1e884f6c9f8f63d7b7c76e37b (diff) | |
download | lingo-ap-tracker-33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea.tar.gz lingo-ap-tracker-33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea.tar.bz2 lingo-ap-tracker-33bf1f9653ed608de5554940dc8a0c3f5dc7e4ea.zip |
Go back to old logging system
Brought in libfmt to handle string formatting and replace a bunch of ostringstream uses.
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 | ||