summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
authorJosh Ferrell <josh@vector35.com>2024-12-04 15:05:08 -0500
committerJosh Ferrell <josh@vector35.com>2024-12-16 15:16:49 -0500
commit6d93e8319411fca2c0d67e7ab29d135f5348328c (patch)
treec5d61e2084eb251673006fc72cbe8346e0636931 /binaryninjaapi.h
parent8ea98cab89afb0c14073141f30203486d1333b07 (diff)
Update dependencies and fix compilation errors/warnings for g++14 and c++20
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index e553aa48..d9843a8b 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -243,9 +243,9 @@ namespace BinaryNinja {
#endif
public:
- Ref<T>() : m_obj(nullptr) {}
+ Ref() : m_obj(nullptr) {}
- Ref<T>(T* obj) : m_obj(obj)
+ Ref(T* obj) : m_obj(obj)
{
if (m_obj)
{
@@ -256,7 +256,7 @@ namespace BinaryNinja {
}
}
- Ref<T>(const Ref<T>& obj) : m_obj(obj.m_obj)
+ Ref(const Ref<T>& obj) : m_obj(obj.m_obj)
{
if (m_obj)
{
@@ -267,7 +267,7 @@ namespace BinaryNinja {
}
}
- Ref<T>(Ref<T>&& other) : m_obj(other.m_obj)
+ Ref(Ref<T>&& other) : m_obj(other.m_obj)
{
other.m_obj = 0;
#ifdef BN_REF_COUNT_DEBUG
@@ -275,7 +275,7 @@ namespace BinaryNinja {
#endif
}
- ~Ref<T>()
+ ~Ref()
{
if (m_obj)
{
@@ -369,8 +369,8 @@ namespace BinaryNinja {
T* m_obj;
public:
- CallbackRef<T>(void* obj) : m_obj((T*)obj) { m_obj->AddRefForCallback(); }
- ~CallbackRef<T>() { m_obj->ReleaseForCallback(); }
+ CallbackRef(void* obj) : m_obj((T*)obj) { m_obj->AddRefForCallback(); }
+ ~CallbackRef() { m_obj->ReleaseForCallback(); }
operator T*() const { return m_obj; }
T* operator->() const { return m_obj; }
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>>
{
auto it = ctx.begin(), end = ctx.end();
if (it != end && (*it == 's' || *it == 'S' || *it == 'd' || *it == 'x')) presentation = *it++;
- if (it != end && *it != '}') detail::throw_format_error("invalid format");
+ if (it != end && *it != '}') report_error("invalid format");
return it;
}
};