Merge remote-tracking branch 'upstream/master' into tilemap-docs

This commit is contained in:
octorock
2023-05-31 23:51:20 +02:00
254 changed files with 4013 additions and 4939 deletions
+3 -3
View File
@@ -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();
}
}
}
+2 -2
View File
@@ -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);
+2 -2
View File
@@ -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;