diff options
| -rw-r--r-- | zen/internalfile.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/zen/internalfile.cpp b/zen/internalfile.cpp index 32108f615..d1314a75e 100644 --- a/zen/internalfile.cpp +++ b/zen/internalfile.cpp @@ -122,8 +122,6 @@ FileBufferManager::ReturnBuffer(zen::IoBuffer Buffer) ////////////////////////////////////////////////////////////////////////// -using namespace fmt::literals; - InternalFile::InternalFile() { } @@ -152,6 +150,7 @@ InternalFile::OpenWrite(std::filesystem::path FileName, bool IsCreate) if (FAILED(hRes)) { + using namespace fmt::literals; throw std::system_error(GetLastError(), std::system_category(), "Failed to open file for writing: '{}'"_format(FileName)); } } @@ -165,6 +164,7 @@ InternalFile::OpenRead(std::filesystem::path FileName) if (FAILED(hRes)) { + using namespace fmt::literals; throw std::system_error(GetLastError(), std::system_category(), "Failed to open file for reading: '{}'"_format(FileName)); } } @@ -199,6 +199,7 @@ InternalFile::Read(void* Data, uint64_t Size, uint64_t Offset) if (FAILED(hRes)) { + using namespace fmt::literals; throw std::system_error(GetLastError(), std::system_category(), "Failed to read from file '{}'"_format(zen::PathFromHandle(m_File))); @@ -217,6 +218,7 @@ InternalFile::Write(const void* Data, uint64_t Size, uint64_t Offset) if (FAILED(hRes)) { + using namespace fmt::literals; throw std::system_error(GetLastError(), std::system_category(), "Failed to write to file '{}'"_format(zen::PathFromHandle(m_File))); } } |