diff --git a/include/athena/Global.hpp b/include/athena/Global.hpp index 04e2794..c4aea25 100644 --- a/include/athena/Global.hpp +++ b/include/athena/Global.hpp @@ -125,7 +125,7 @@ typedef void (*atEXCEPTION_HANDLER)(athena::error::Level level, const char* /*fi atEXCEPTION_HANDLER atGetExceptionHandler(); /** - * atSetExceptionHandler is only meant to be used a the start and end of an application's lifetime, + * atSetExceptionHandler is only meant to be used at the start and end of an application's lifetime, * this function cannot be considered thread-safe, therefore modifying during runtime is not recommended. */ void atSetExceptionHandler(atEXCEPTION_HANDLER func); diff --git a/src/athena/MemoryWriter.cpp b/src/athena/MemoryWriter.cpp index a3c6b2f..b75b078 100644 --- a/src/athena/MemoryWriter.cpp +++ b/src/athena/MemoryWriter.cpp @@ -189,7 +189,8 @@ void MemoryWriter::save(std::string_view filename) { m_filepath = filename; } - std::unique_ptr out{std::fopen(m_filepath.c_str(), "wb"), std::fclose}; + auto deleter = [](FILE* f) { return std::fclose(f); }; + std::unique_ptr out{std::fopen(m_filepath.c_str(), "wb"), deleter}; if (!out) { atError("Unable to open file '{}'", m_filepath); setError();