mirror of
https://github.com/libAthena/athena.git
synced 2025-07-13 00:26:09 +00:00
Remove rest of fmt
This commit is contained in:
parent
e0fbcfee7e
commit
5a416eec41
@ -42,7 +42,7 @@ void FileReader::open() {
|
|||||||
m_fileHandle = 0;
|
m_fileHandle = 0;
|
||||||
std::string _filename = filename();
|
std::string _filename = filename();
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("File not found '{}'"), _filename);
|
atError("File not found '{}'") _filename);
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ void FileReader::open() {
|
|||||||
void FileReader::close() {
|
void FileReader::close() {
|
||||||
if (!m_fileHandle) {
|
if (!m_fileHandle) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Cannot close an unopened stream"));
|
atError("Cannot close an unopened stream");
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -85,7 +85,7 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
|
|||||||
if (m_offset > length()) {
|
if (m_offset > length()) {
|
||||||
oldOff = m_offset;
|
oldOff = m_offset;
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Unable to seek in file"));
|
atError("Unable to seek in file");
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
|
|||||||
li.QuadPart = pos;
|
li.QuadPart = pos;
|
||||||
if (!SetFilePointerEx(m_fileHandle, li, nullptr, DWORD(origin))) {
|
if (!SetFilePointerEx(m_fileHandle, li, nullptr, DWORD(origin))) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Unable to seek in file"));
|
atError("Unable to seek in file");
|
||||||
setError();
|
setError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,7 +113,7 @@ void FileReader::seek(atInt64 pos, SeekOrigin origin) {
|
|||||||
atUint64 FileReader::position() const {
|
atUint64 FileReader::position() const {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("File not open"));
|
atError("File not open");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ atUint64 FileReader::position() const {
|
|||||||
atUint64 FileReader::length() const {
|
atUint64 FileReader::length() const {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("File not open"));
|
atError("File not open");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ atUint64 FileReader::length() const {
|
|||||||
atUint64 FileReader::readUBytesToBuf(void* buf, atUint64 len) {
|
atUint64 FileReader::readUBytesToBuf(void* buf, atUint64 len) {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("File not open for reading"));
|
atError("File not open for reading");
|
||||||
setError();
|
setError();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ void FileWriter::open(bool overwrite) {
|
|||||||
if (m_fileHandle == INVALID_HANDLE_VALUE) {
|
if (m_fileHandle == INVALID_HANDLE_VALUE) {
|
||||||
m_fileHandle = 0;
|
m_fileHandle = 0;
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Unable to open file '{}'"), filename());
|
atError("Unable to open file '{}'", filename());
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ void FileWriter::open(bool overwrite) {
|
|||||||
void FileWriter::close() {
|
void FileWriter::close() {
|
||||||
if (!m_fileHandle) {
|
if (!m_fileHandle) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Cannot close an unopened stream"));
|
atError("Cannot close an unopened stream");
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ void FileWriter::close() {
|
|||||||
void FileWriter::seek(atInt64 pos, SeekOrigin origin) {
|
void FileWriter::seek(atInt64 pos, SeekOrigin origin) {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Unable to seek in file, not open"));
|
atError("Unable to seek in file, not open");
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ void FileWriter::seek(atInt64 pos, SeekOrigin origin) {
|
|||||||
li.QuadPart = pos;
|
li.QuadPart = pos;
|
||||||
if (!SetFilePointerEx(m_fileHandle, li, nullptr, DWORD(origin))) {
|
if (!SetFilePointerEx(m_fileHandle, li, nullptr, DWORD(origin))) {
|
||||||
if (m_globalErr)
|
if (m_globalErr)
|
||||||
atError(FMT_STRING("Unable to seek in file"));
|
atError("Unable to seek in file");
|
||||||
setError();
|
setError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ atUint64 FileWriter::length() const { return utility::fileSize(m_filename); }
|
|||||||
void FileWriter::writeUBytes(const atUint8* data, atUint64 len) {
|
void FileWriter::writeUBytes(const atUint8* data, atUint64 len) {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
if (m_globalErr) {
|
if (m_globalErr) {
|
||||||
atError(FMT_STRING("File not open for writing"));
|
atError("File not open for writing");
|
||||||
}
|
}
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
@ -116,7 +116,7 @@ void FileWriter::writeUBytes(const atUint8* data, atUint64 len) {
|
|||||||
|
|
||||||
if (WriteFile(m_fileHandle, data, toWrite, &written, nullptr) == FALSE) {
|
if (WriteFile(m_fileHandle, data, toWrite, &written, nullptr) == FALSE) {
|
||||||
if (m_globalErr) {
|
if (m_globalErr) {
|
||||||
atError(FMT_STRING("Unable to write to file"));
|
atError("Unable to write to file");
|
||||||
}
|
}
|
||||||
setError();
|
setError();
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user