mirror of
https://github.com/Mr-Wiseguy/N64Recomp.git
synced 2024-12-26 17:36:16 +00:00
Fix MSVC v143 errors with fmt
This commit is contained in:
parent
302dd091c2
commit
30b1fceaf2
|
@ -985,7 +985,7 @@ bool read_list_file(const std::filesystem::path& filename, std::unordered_set<st
|
|||
|
||||
int main(int argc, char** argv) {
|
||||
auto exit_failure = [] (const std::string& error_str) {
|
||||
fmt::print(stderr, error_str);
|
||||
fmt::vprint(stderr, error_str, fmt::make_format_args());
|
||||
std::exit(EXIT_FAILURE);
|
||||
};
|
||||
|
||||
|
@ -1102,7 +1102,7 @@ int main(int argc, char** argv) {
|
|||
|
||||
// Check that the function actually contains this vram address.
|
||||
if (patch.vram < func_vram || patch.vram >= func_vram + func.words.size() * sizeof(func.words[0])) {
|
||||
exit_failure(fmt::format("Function {} has an instruction patch for vram 0x{:08X} but doesn't contain that vram address!", patch.vram));
|
||||
exit_failure(fmt::vformat("Function {} has an instruction patch for vram 0x{:08X} but doesn't contain that vram address!", fmt::make_format_args(patch.vram)));
|
||||
}
|
||||
|
||||
// Calculate the instruction index and modify the instruction.
|
||||
|
|
|
@ -78,12 +78,12 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::F
|
|||
|
||||
auto print_line = [&]<typename... Ts>(fmt::format_string<Ts...> fmt_str, Ts ...args) {
|
||||
print_indent();
|
||||
fmt::print(output_file, fmt_str, args...);
|
||||
fmt::vprint(output_file, fmt_str, fmt::make_format_args(args...));
|
||||
fmt::print(output_file, ";\n");
|
||||
};
|
||||
|
||||
auto print_branch_condition = [&]<typename... Ts>(fmt::format_string<Ts...> fmt_str, Ts ...args) {
|
||||
fmt::print(output_file, fmt_str, args...);
|
||||
fmt::vprint(output_file, fmt_str, fmt::make_format_args(args...));
|
||||
fmt::print(output_file, " ");
|
||||
};
|
||||
|
||||
|
@ -99,7 +99,7 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::F
|
|||
process_instruction(context, func, stats, skipped_insns, instr_index + 1, instructions, output_file, false, false, link_branch_index, next_reloc_index, dummy_needs_link_branch, dummy_is_branch_likely, static_funcs_out);
|
||||
}
|
||||
print_indent();
|
||||
fmt::print(output_file, fmt_str, args...);
|
||||
fmt::vprint(output_file, fmt_str, fmt::make_format_args(args...));
|
||||
if (needs_link_branch) {
|
||||
fmt::print(output_file, ";\n goto after_{};\n", link_branch_index);
|
||||
} else {
|
||||
|
@ -120,7 +120,7 @@ bool process_instruction(const RecompPort::Context& context, const RecompPort::F
|
|||
process_instruction(context, func, stats, skipped_insns, instr_index + 1, instructions, output_file, true, false, link_branch_index, next_reloc_index, dummy_needs_link_branch, dummy_is_branch_likely, static_funcs_out);
|
||||
}
|
||||
fmt::print(output_file, " ");
|
||||
fmt::print(output_file, fmt_str, args...);
|
||||
fmt::vprint(output_file, fmt_str, fmt::make_format_args(args...));
|
||||
if (needs_link_branch) {
|
||||
fmt::print(output_file, ";\n goto after_{}", link_branch_index);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue