diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index d854d2633..64bbe9ddc 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -6,7 +6,6 @@ #include "mpqapi.h" #include -#include #include #include #include @@ -92,7 +91,7 @@ public: bool Open(const char *path, std::ios::openmode mode) { s_ = CreateFileStream(path, mode); - return CheckError("new std::fstream(\"%s\", %s)", path, OpenModeToString(mode).c_str()); + return CheckError("new std::fstream(\"{}\", {})", path, OpenModeToString(mode).c_str()); } void Close() @@ -108,31 +107,31 @@ public: bool Seekp(std::streampos pos) { s_->seekp(pos); - return CheckError("seekp(%" PRIuMAX ")", static_cast(pos)); + return CheckError("seekp({})", pos); } bool Seekp(std::streamoff pos, std::ios::seekdir dir) { s_->seekp(pos, dir); - return CheckError("seekp(%" PRIdMAX ", %s)", static_cast(pos), DirToString(dir)); + return CheckError("seekp({}, {})", pos, DirToString(dir)); } bool Tellp(std::streampos *result) { *result = s_->tellp(); - return CheckError("tellp() = %" PRIuMAX, static_cast(*result)); + return CheckError("tellp() = {}", *result); } bool Write(const char *data, std::streamsize size) { s_->write(data, size); - return CheckError("write(data, %" PRIuMAX ")", static_cast(size)); + return CheckError("write(data, {})", size); } bool Read(char *out, std::streamsize size) { s_->read(out, size); - return CheckError("read(out, %" PRIuMAX ")", static_cast(size)); + return CheckError("read(out, {})", size); } private: