diff options
| author | octorock <79596758+octorock@users.noreply.github.com> | 2023-05-31 23:51:20 +0200 |
|---|---|---|
| committer | octorock <79596758+octorock@users.noreply.github.com> | 2023-05-31 23:51:20 +0200 |
| commit | bbac5ace3fb87828f288ff583f72a5a51af5a05f (patch) | |
| tree | 70fb8b55e62a1d270e9f3cec927519a34ca17100 /tools/src | |
| parent | 134f39a0bdad19fc794e19fba56d072d1ab30022 (diff) | |
| parent | 79bbd540a8846e48f97b77ea03d28828bdcca0ae (diff) | |
Merge remote-tracking branch 'upstream/master' into tilemap-docs
Diffstat (limited to 'tools/src')
| -rw-r--r-- | tools/src/scaninc/asm_file.cpp | 6 | ||||
| -rw-r--r-- | tools/src/scaninc/c_file.cpp | 4 | ||||
| -rw-r--r-- | tools/src/scaninc/source_file.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/tools/src/scaninc/asm_file.cpp b/tools/src/scaninc/asm_file.cpp index f53777bc..18b1e956 100644 --- a/tools/src/scaninc/asm_file.cpp +++ b/tools/src/scaninc/asm_file.cpp @@ -29,7 +29,7 @@ AsmFile::AsmFile(std::string path) { FILE* fp = std::fopen(path.c_str(), "rb"); if (fp == NULL) - fatal_error("Failed to open \"%s\" for reading.\n", path.c_str()); + fatal_error("Failed to open \"{}\" for reading.\n", path.c_str()); std::fseek(fp, 0, SEEK_END); @@ -40,7 +40,7 @@ AsmFile::AsmFile(std::string path) { std::rewind(fp); if (std::fread(m_buffer, m_size, 1, fp) != 1) - fatal_error("Failed to read \"%s\".\n", path.c_str()); + fatal_error("Failed to read \"{}\".\n", path.c_str()); std::fclose(fp); @@ -159,7 +159,7 @@ void AsmFile::SkipString() { fatal_error(INPUT_ERROR_MESSAGE("unexpected EOF in string\n")); if (c == '\\') { - c = GetChar(); + c = GetChar(); } } } diff --git a/tools/src/scaninc/c_file.cpp b/tools/src/scaninc/c_file.cpp index a8ff921f..fc5ed555 100644 --- a/tools/src/scaninc/c_file.cpp +++ b/tools/src/scaninc/c_file.cpp @@ -26,7 +26,7 @@ CFile::CFile(std::string path) { FILE* fp = std::fopen(path.c_str(), "rb"); if (fp == NULL) - fatal_error("Failed to open \"%s\" for reading.\n", path.c_str()); + fatal_error("Failed to open \"{}\" for reading.\n", path.c_str()); std::fseek(fp, 0, SEEK_END); @@ -38,7 +38,7 @@ CFile::CFile(std::string path) { std::rewind(fp); if (std::fread(m_buffer, m_size, 1, fp) != 1) - fatal_error("Failed to read \"%s\".\n", path.c_str()); + fatal_error("Failed to read \"{}\".\n", path.c_str()); std::fclose(fp); diff --git a/tools/src/scaninc/source_file.cpp b/tools/src/scaninc/source_file.cpp index 0cefc9f1..107396b0 100644 --- a/tools/src/scaninc/source_file.cpp +++ b/tools/src/scaninc/source_file.cpp @@ -25,7 +25,7 @@ SourceFileType GetFileType(std::string& path) { std::size_t pos = path.find_last_of('.'); if (pos == std::string::npos) - fatal_error("no file extension in path \"%s\"\n", path.c_str()); + fatal_error("no file extension in path \"{}\"\n", path.c_str()); std::string extension = path.substr(pos + 1); @@ -38,7 +38,7 @@ SourceFileType GetFileType(std::string& path) { else if (extension == "inc") return SourceFileType::Inc; else - fatal_error("Unrecognized extension \"%s\"\n", extension.c_str()); + fatal_error("Unrecognized extension \"{}\"\n", extension.c_str()); // Unreachable return SourceFileType::Cpp; |
