summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--binaryninjaapi.h20
-rw-r--r--binaryviewtype.cpp2
-rw-r--r--transform.cpp3
3 files changed, 13 insertions, 12 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h
index 712e5cc8..06c4c8c0 100644
--- a/binaryninjaapi.h
+++ b/binaryninjaapi.h
@@ -28,22 +28,22 @@ namespace BinaryNinja
void AddRef()
{
- #ifdef WIN32
+#ifdef WIN32
InterlockedIncrement((LONG*)&m_refs);
- #else
+#else
__sync_fetch_and_add(&m_refs, 1);
- #endif
+#endif
}
void Release()
{
- #ifdef WIN32
+#ifdef WIN32
if (InterlockedDecrement((LONG*)&m_refs) == 0)
delete this;
- #else
+#else
if (__sync_fetch_and_add(&m_refs, -1) == 1)
delete this;
- #endif
+#endif
}
};
@@ -552,9 +552,9 @@ namespace BinaryNinja
virtual std::vector<TransformParameter> GetParameters() const;
virtual bool Decode(const DataBuffer& input, DataBuffer& output, const std::map<std::string, DataBuffer>& params =
- std::map<std::string, DataBuffer>());
+ std::map<std::string, DataBuffer>());
virtual bool Encode(const DataBuffer& input, DataBuffer& output, const std::map<std::string, DataBuffer>& params =
- std::map<std::string, DataBuffer>());
+ std::map<std::string, DataBuffer>());
};
class CoreTransform: public Transform
@@ -564,8 +564,8 @@ namespace BinaryNinja
virtual std::vector<TransformParameter> GetParameters() const override;
virtual bool Decode(const DataBuffer& input, DataBuffer& output, const std::map<std::string, DataBuffer>& params =
- std::map<std::string, DataBuffer>()) override;
+ std::map<std::string, DataBuffer>()) override;
virtual bool Encode(const DataBuffer& input, DataBuffer& output, const std::map<std::string, DataBuffer>& params =
- std::map<std::string, DataBuffer>()) override;
+ std::map<std::string, DataBuffer>()) override;
};
}
diff --git a/binaryviewtype.cpp b/binaryviewtype.cpp
index 636a8856..8089f506 100644
--- a/binaryviewtype.cpp
+++ b/binaryviewtype.cpp
@@ -46,7 +46,7 @@ void BinaryViewType::Register(BinaryViewType* type)
callbacks.isValidForData = IsValidCallback;
type->m_type = BNRegisterBinaryViewType(type->m_nameForRegister.c_str(),
- type->m_longNameForRegister.c_str(), &callbacks);
+ type->m_longNameForRegister.c_str(), &callbacks);
}
diff --git a/transform.cpp b/transform.cpp
index 731ac19c..157fe660 100644
--- a/transform.cpp
+++ b/transform.cpp
@@ -114,7 +114,8 @@ void Transform::Register(Transform* xform)
callbacks.decode = DecodeCallback;
callbacks.encode = EncodeCallback;
xform->m_xform = BNRegisterTransformType(xform->m_typeForRegister, xform->m_nameForRegister.c_str(),
- xform->m_longNameForRegister.c_str(), xform->m_groupForRegister.c_str(), &callbacks);
+ xform->m_longNameForRegister.c_str(), xform->m_groupForRegister.c_str(),
+ &callbacks);
}