Skip to content

Commit

Permalink
Fix compilation errors/warnings for g++14 and c++20
Browse files Browse the repository at this point in the history
  • Loading branch information
negasora committed Dec 16, 2024
1 parent b73ee1c commit 32c21c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions api/debuggerapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ namespace BinaryNinjaDebuggerAPI {
#endif

public:
DbgRef<T>() : m_obj(NULL) {}
DbgRef() : m_obj(NULL) {}

DbgRef<T>(T* obj) : m_obj(obj)
DbgRef(T* obj) : m_obj(obj)
{
if (m_obj)
{
Expand All @@ -134,7 +134,7 @@ namespace BinaryNinjaDebuggerAPI {
}
}

DbgRef<T>(const DbgRef<T>& obj) : m_obj(obj.m_obj)
DbgRef(const DbgRef<T>& obj) : m_obj(obj.m_obj)
{
if (m_obj)
{
Expand All @@ -145,15 +145,15 @@ namespace BinaryNinjaDebuggerAPI {
}
}

DbgRef<T>(DbgRef<T>&& other) : m_obj(other.m_obj)
DbgRef(DbgRef<T>&& other) : m_obj(other.m_obj)
{
other.m_obj = 0;
#ifdef BN_REF_COUNT_DEBUG
m_assignmentTrace = other.m_assignmentTrace;
#endif
}

~DbgRef<T>()
~DbgRef()
{
if (m_obj)
{
Expand Down
4 changes: 2 additions & 2 deletions cli/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ struct fmt::formatter<Log::Style>
}

template <typename FormatContext>
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());
}
};
};

0 comments on commit 32c21c2

Please sign in to comment.