Skip to content

Commit 6d93e83

Browse files
committed
Update dependencies and fix compilation errors/warnings for g++14 and c++20
1 parent 8ea98ca commit 6d93e83

File tree

10 files changed

+82
-68
lines changed

10 files changed

+82
-68
lines changed

binaryninjaapi.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ namespace BinaryNinja {
243243
#endif
244244

245245
public:
246-
Ref<T>() : m_obj(nullptr) {}
246+
Ref() : m_obj(nullptr) {}
247247

248-
Ref<T>(T* obj) : m_obj(obj)
248+
Ref(T* obj) : m_obj(obj)
249249
{
250250
if (m_obj)
251251
{
@@ -256,7 +256,7 @@ namespace BinaryNinja {
256256
}
257257
}
258258

259-
Ref<T>(const Ref<T>& obj) : m_obj(obj.m_obj)
259+
Ref(const Ref<T>& obj) : m_obj(obj.m_obj)
260260
{
261261
if (m_obj)
262262
{
@@ -267,15 +267,15 @@ namespace BinaryNinja {
267267
}
268268
}
269269

270-
Ref<T>(Ref<T>&& other) : m_obj(other.m_obj)
270+
Ref(Ref<T>&& other) : m_obj(other.m_obj)
271271
{
272272
other.m_obj = 0;
273273
#ifdef BN_REF_COUNT_DEBUG
274274
m_assignmentTrace = other.m_assignmentTrace;
275275
#endif
276276
}
277277

278-
~Ref<T>()
278+
~Ref()
279279
{
280280
if (m_obj)
281281
{
@@ -369,8 +369,8 @@ namespace BinaryNinja {
369369
T* m_obj;
370370

371371
public:
372-
CallbackRef<T>(void* obj) : m_obj((T*)obj) { m_obj->AddRefForCallback(); }
373-
~CallbackRef<T>() { m_obj->ReleaseForCallback(); }
372+
CallbackRef(void* obj) : m_obj((T*)obj) { m_obj->AddRefForCallback(); }
373+
~CallbackRef() { m_obj->ReleaseForCallback(); }
374374
operator T*() const { return m_obj; }
375375
T* operator->() const { return m_obj; }
376376
T& operator*() const { return *m_obj; }
@@ -19983,7 +19983,7 @@ struct fmt::formatter<T, char, std::enable_if_t<std::is_enum_v<T>, void>>
1998319983
{
1998419984
auto it = ctx.begin(), end = ctx.end();
1998519985
if (it != end && (*it == 's' || *it == 'S' || *it == 'd' || *it == 'x')) presentation = *it++;
19986-
if (it != end && *it != '}') detail::throw_format_error("invalid format");
19986+
if (it != end && *it != '}') report_error("invalid format");
1998719987
return it;
1998819988
}
1998919989
};

highlevelilinstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,7 @@ template<> struct fmt::formatter<IL_INS_NS::HighLevelILInstruction>
14481448
auto it = ctx.begin(), end = ctx.end();
14491449
if (it != end && *it == '?')
14501450
presentation = *it++;
1451-
if (it != end && *it != '}') detail::throw_format_error("invalid format");
1451+
if (it != end && *it != '}') report_error("invalid format");
14521452
return it;
14531453
}
14541454
};

lowlevelilinstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2026,7 +2026,7 @@ template<> struct fmt::formatter<IL_INS_NS::LowLevelILInstruction>
20262026
auto it = ctx.begin(), end = ctx.end();
20272027
if (it != end && *it == '?')
20282028
presentation = *it++;
2029-
if (it != end && *it != '}') detail::throw_format_error("invalid format");
2029+
if (it != end && *it != '}') report_error("invalid format");
20302030
return it;
20312031
}
20322032
};

mediumlevelilinstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ template<> struct fmt::formatter<IL_INS_NS::MediumLevelILInstruction>
17291729
auto it = ctx.begin(), end = ctx.end();
17301730
if (it != end && *it == '?')
17311731
presentation = *it++;
1732-
if (it != end && *it != '}') detail::throw_format_error("invalid format");
1732+
if (it != end && *it != '}') report_error("invalid format");
17331733
return it;
17341734
}
17351735
};

0 commit comments

Comments
 (0)