Skip to content

Commit 0b7ac7d

Browse files
committed
Fixed spdlog issues
1 parent 19b3ca7 commit 0b7ac7d

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ if(USE_STANDALONE)
242242
FetchContent_Declare(
243243
spdlog
244244
GIT_REPOSITORY https://github.com/gabime/spdlog.git
245-
GIT_TAG 7e635fca68d014934b4af8a1cf874f63989352b7
245+
GIT_TAG 79524ddd08a4ec981b7fea76afd08ee05f83755d
246246
)
247247

248248
FetchContent_MakeAvailable(spdlog)
@@ -253,7 +253,7 @@ else()
253253
FetchContent_Declare(
254254
spdlog
255255
GIT_REPOSITORY https://github.com/gabime/spdlog.git
256-
GIT_TAG 7e635fca68d014934b4af8a1cf874f63989352b7
256+
GIT_TAG 79524ddd08a4ec981b7fea76afd08ee05f83755d
257257
)
258258

259259
FetchContent_MakeAvailable(spdlog)

src/factories/sm64/BehaviorScriptFactory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ std::optional<std::shared_ptr<IParsedData>> SM64::BehaviorScriptFactory::parse(s
185185
while(processing) {
186186
auto opcode = static_cast<BehaviorOpcode>(cmd[0x00]);
187187

188-
// SPDLOG_INFO("Processing Command {}", opcode);
188+
SPDLOG_INFO("Processing Command {}", opcode);
189189

190190
std::vector<BehaviorArgument> arguments;
191191

src/factories/sm64/behavior/BehaviorCommand.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ inline std::ostream& operator<<(std::ostream& out, const BehaviorOpcode& opcode)
245245
return out << output;
246246
}
247247

248+
template <>
249+
struct fmt::formatter<BehaviorOpcode> : fmt::formatter<std::string> {
250+
auto format(const BehaviorOpcode& opcode, format_context& ctx) const {
251+
std::stringstream ss;
252+
ss << opcode; // This calls your operator<< above
253+
return formatter<std::string>::format(ss.str(), ctx);
254+
}
255+
};
256+
248257
#define cur_behavior_cmd_u8(offset) \
249258
(cmd[CMD_PROCESS_OFFSET(offset)])
250259

src/factories/sm64/geo/GeoCommand.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,15 @@ inline std::ostream& operator<<(std::ostream& out, const GeoOpcode& opcode) {
153153
return out << output;
154154
}
155155

156+
template <>
157+
struct fmt::formatter<GeoOpcode> : fmt::formatter<std::string> {
158+
auto format(const GeoOpcode& opcode, format_context& ctx) const {
159+
std::stringstream ss;
160+
ss << opcode; // This calls your operator<< above
161+
return formatter<std::string>::format(ss.str(), ctx);
162+
}
163+
};
164+
156165
#define cur_geo_cmd_u8(offset) \
157166
(cmd[CMD_PROCESS_OFFSET(offset)])
158167

src/factories/sm64/level/LevelCommand.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,15 @@ inline std::ostream& operator<<(std::ostream& out, const LevelOpcode& opcode) {
265265
return out << output;
266266
}
267267

268+
template <>
269+
struct fmt::formatter<LevelOpcode> : fmt::formatter<std::string> {
270+
auto format(const LevelOpcode& opcode, format_context& ctx) const {
271+
std::stringstream ss;
272+
ss << opcode; // This calls your operator<< above
273+
return formatter<std::string>::format(ss.str(), ctx);
274+
}
275+
};
276+
268277
#define cur_level_cmd_u8(offset) \
269278
(cmd[CMD_PROCESS_OFFSET(offset)])
270279

0 commit comments

Comments
 (0)