Remove rest of fmt

This commit is contained in:
Phillip Stephens 2025-01-02 15:54:48 -08:00
parent e0fbcfee7e
commit 5a416eec41
2 changed files with 13 additions and 13 deletions

View File

@ -42,7 +42,7 @@ void FileReader::open() {
m_fileHandle = 0;
std::string _filename = filename();
if (m_globalErr)
atError(FMT_STRING("File not found '{}'"), _filename);
atError("File not found '{}'") _filename);
setError();
return;
}
@ -54,7 +54,7 @@ void FileReader::open() {
void FileReader::close() {
if (!m_fileHandle) {
if (m_globalErr)
atError(FMT_STRING("Cannot close an unopened stream"));
atError("Cannot close an unopened stream");
setError();
return;
}
@ -85,7 +85,7 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
if (m_offset > length()) {
oldOff = m_offset;
if (m_globalErr)
atError(FMT_STRING("Unable to seek in file"));
atError("Unable to seek in file");
setError();
return;
}
@ -104,7 +104,7 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
li.QuadPart = pos;
if (!SetFilePointerEx(m_fileHandle, li, nullptr, DWORD(origin))) {
if (m_globalErr)
atError(FMT_STRING("Unable to seek in file"));
atError("Unable to seek in file");
setError();
}
}
@ -113,7 +113,7 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
atUint64 FileReader::position() const {
if (!isOpen()) {
if (m_globalErr)
atError(FMT_STRING("File not open"));
atError("File not open");
return 0;
}
@ -130,7 +130,7 @@ atUint64 FileReader::position() const {
atUint64 FileReader::length() const {
if (!isOpen()) {
if (m_globalErr)
atError(FMT_STRING("File not open"));
atError("File not open");
return 0;
}
@ -142,7 +142,7 @@ atUint64 FileReader::length() const {
atUint64 FileReader::readUBytesToBuf(void* buf, atUint64 len) {
if (!isOpen()) {
if (m_globalErr)
atError(FMT_STRING("File not open for reading"));
atError("File not open for reading");
setError();
return 0;
}

View File

@ -49,7 +49,7 @@ void FileWriter::open(bool overwrite) {
if (m_fileHandle == INVALID_HANDLE_VALUE) {
m_fileHandle = 0;
if (m_globalErr)
atError(FMT_STRING("Unable to open file '{}'"), filename());
atError("Unable to open file '{}'", filename());
setError();
return;
}
@ -61,7 +61,7 @@ void FileWriter::open(bool overwrite) {
void FileWriter::close() {
if (!m_fileHandle) {
if (m_globalErr)
atError(FMT_STRING("Cannot close an unopened stream"));
atError("Cannot close an unopened stream");
setError();
return;
}
@ -77,7 +77,7 @@ void FileWriter::close() {
void FileWriter::seek(atInt64 pos, SeekOrigin origin) {
if (!isOpen()) {
if (m_globalErr)
atError(FMT_STRING("Unable to seek in file, not open"));
atError("Unable to seek in file, not open");
setError();
return;
}
@ -86,7 +86,7 @@ void FileWriter::seek(atInt64 pos, SeekOrigin origin) {
li.QuadPart = pos;
if (!SetFilePointerEx(m_fileHandle, li, nullptr, DWORD(origin))) {
if (m_globalErr)
atError(FMT_STRING("Unable to seek in file"));
atError("Unable to seek in file");
setError();
}
}
@ -103,7 +103,7 @@ atUint64 FileWriter::length() const { return utility::fileSize(m_filename); }
void FileWriter::writeUBytes(const atUint8* data, atUint64 len) {
if (!isOpen()) {
if (m_globalErr) {
atError(FMT_STRING("File not open for writing"));
atError("File not open for writing");
}
setError();
return;
@ -116,7 +116,7 @@ void FileWriter::writeUBytes(const atUint8* data, atUint64 len) {
if (WriteFile(m_fileHandle, data, toWrite, &written, nullptr) == FALSE) {
if (m_globalErr) {
atError(FMT_STRING("Unable to write to file"));
atError("Unable to write to file");
}
setError();
return;