From 32c21c237ab9fec83268a1c135895011a010b8ee Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 4 Dec 2024 17:40:46 -0500 Subject: [PATCH] Fix compilation errors/warnings for g++14 and c++20 --- api/debuggerapi.h | 10 +++++----- cli/log.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/debuggerapi.h b/api/debuggerapi.h index 9ab6022..5103660 100644 --- a/api/debuggerapi.h +++ b/api/debuggerapi.h @@ -121,9 +121,9 @@ namespace BinaryNinjaDebuggerAPI { #endif public: - DbgRef() : m_obj(NULL) {} + DbgRef() : m_obj(NULL) {} - DbgRef(T* obj) : m_obj(obj) + DbgRef(T* obj) : m_obj(obj) { if (m_obj) { @@ -134,7 +134,7 @@ namespace BinaryNinjaDebuggerAPI { } } - DbgRef(const DbgRef& obj) : m_obj(obj.m_obj) + DbgRef(const DbgRef& obj) : m_obj(obj.m_obj) { if (m_obj) { @@ -145,7 +145,7 @@ namespace BinaryNinjaDebuggerAPI { } } - DbgRef(DbgRef&& other) : m_obj(other.m_obj) + DbgRef(DbgRef&& other) : m_obj(other.m_obj) { other.m_obj = 0; #ifdef BN_REF_COUNT_DEBUG @@ -153,7 +153,7 @@ namespace BinaryNinjaDebuggerAPI { #endif } - ~DbgRef() + ~DbgRef() { if (m_obj) { diff --git a/cli/log.h b/cli/log.h index 9bed666..ab40cf3 100644 --- a/cli/log.h +++ b/cli/log.h @@ -114,8 +114,8 @@ struct fmt::formatter } template - auto format(const Log::Style& style, FormatContext& ctx) -> decltype(ctx.out()) + auto format(const Log::Style& style, FormatContext& ctx) const -> decltype(ctx.out()) { return format_to(ctx.out(), "{}", style.AsAnsi()); } -}; \ No newline at end of file +};