mirror of https://github.com/AxioDL/nod.git
Merge pull request #12 from lioncash/fmt
FileIOWin32: Amend fmt format strings
This commit is contained in:
commit
793413540d
|
@ -59,7 +59,7 @@ public:
|
||||||
fp = CreateFile2(path.data(), GENERIC_WRITE, FILE_SHARE_WRITE, CREATE_ALWAYS, nullptr);
|
fp = CreateFile2(path.data(), GENERIC_WRITE, FILE_SHARE_WRITE, CREATE_ALWAYS, nullptr);
|
||||||
#endif
|
#endif
|
||||||
if (fp == INVALID_HANDLE_VALUE) {
|
if (fp == INVALID_HANDLE_VALUE) {
|
||||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to open '%s' for writing")), path.data());
|
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to open '{}' for writing")), path);
|
||||||
err = true;
|
err = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ public:
|
||||||
fp = CreateFile2(path.data(), GENERIC_WRITE, FILE_SHARE_WRITE, OPEN_ALWAYS, nullptr);
|
fp = CreateFile2(path.data(), GENERIC_WRITE, FILE_SHARE_WRITE, OPEN_ALWAYS, nullptr);
|
||||||
#endif
|
#endif
|
||||||
if (fp == INVALID_HANDLE_VALUE) {
|
if (fp == INVALID_HANDLE_VALUE) {
|
||||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to open '%s' for writing")), path.data());
|
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to open '{}' for writing")), path);
|
||||||
err = true;
|
err = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ public:
|
||||||
LARGE_INTEGER res;
|
LARGE_INTEGER res;
|
||||||
SetFilePointerEx(fp, li, &res, FILE_CURRENT);
|
SetFilePointerEx(fp, li, &res, FILE_CURRENT);
|
||||||
if (res.QuadPart + int64_t(length) > m_maxWriteSize) {
|
if (res.QuadPart + int64_t(length) > m_maxWriteSize) {
|
||||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("write operation exceeds file's %" PRIi64 "-byte limit")),
|
LogModule.report(logvisor::Error, fmt(_SYS_STR("write operation exceeds file's {}-byte limit")),
|
||||||
m_maxWriteSize);
|
m_maxWriteSize);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ public:
|
||||||
#endif
|
#endif
|
||||||
if (fp == INVALID_HANDLE_VALUE) {
|
if (fp == INVALID_HANDLE_VALUE) {
|
||||||
err = true;
|
err = true;
|
||||||
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to open '%s' for reading")), path.data());
|
LogModule.report(logvisor::Error, fmt(_SYS_STR("unable to open '{}' for reading")), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ReadStream(SystemStringView path, uint64_t offset, bool& err) : ReadStream(path, err) {
|
ReadStream(SystemStringView path, uint64_t offset, bool& err) : ReadStream(path, err) {
|
||||||
|
|
Loading…
Reference in New Issue