fix: Corrected build issues with GCC 13
This commit is contained in:
parent
82f5900759
commit
2d1381860d
@ -5,6 +5,8 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
namespace hex {
|
||||
|
||||
class LanguageDefinition {
|
||||
@ -56,4 +58,12 @@ namespace hex {
|
||||
return LangEntry(string);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
struct fmt::formatter<hex::LangEntry> : fmt::formatter<std::string_view> {
|
||||
template<typename FormatContext>
|
||||
auto format(const hex::LangEntry &entry, FormatContext &ctx) {
|
||||
return fmt::formatter<std::string_view>::format(entry, ctx);
|
||||
}
|
||||
};
|
@ -17,7 +17,7 @@ namespace hex::log {
|
||||
namespace {
|
||||
|
||||
[[maybe_unused]] void printPrefix(FILE *dest, const fmt::text_style &ts, const std::string &level) {
|
||||
const auto now = fmt::localtime(std::chrono::system_clock::now());
|
||||
const auto now = fmt::localtime(std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()));
|
||||
|
||||
fmt::print(dest, "[{0:%H:%M:%S}] ", now);
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace hex::log {
|
||||
|
||||
for (const auto &path : fs::getDefaultPaths(fs::ImHexPath::Logs, true)) {
|
||||
wolv::io::fs::createDirectories(path);
|
||||
g_loggerFile = wolv::io::File(path / hex::format("{0:%Y%m%d_%H%M%S}.log", fmt::localtime(std::chrono::system_clock::now())), wolv::io::File::Mode::Create);
|
||||
g_loggerFile = wolv::io::File(path / hex::format("{0:%Y%m%d_%H%M%S}.log", fmt::localtime(std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()))), wolv::io::File::Mode::Create);
|
||||
g_loggerFile.disableBuffering();
|
||||
|
||||
if (g_loggerFile.isValid()) break;
|
||||
|
Loading…
Reference in New Issue
Block a user