aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-12-02 08:49:33 +0100
committerMartin Ridgers <[email protected]>2021-12-02 11:36:19 +0100
commitd0333822033f87cca9c02b25fdb6c98075960b6d (patch)
tree4fdd04c3944b31161f93752ca5d9c99b7d16a90c
parentWideToUtf8() to PathToUtf8() (diff)
downloadzen-d0333822033f87cca9c02b25fdb6c98075960b6d.tar.xz
zen-d0333822033f87cca9c02b25fdb6c98075960b6d.zip
Moved "using namespace fmt::literals" out of file level scope
-rw-r--r--zen/internalfile.cpp6
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)));
}
}