diff options
| author | KyleMiles <krm504@nyu.edu> | 2022-01-27 22:43:28 -0500 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2022-01-28 00:24:06 -0500 |
| commit | 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 (patch) | |
| tree | dace4156d03148bcaf02df138ab4e0d93e61bc6f /binaryviewtype.cpp | |
| parent | 519c9db22367f2659d1a54599fab47e6313be06e (diff) | |
Format All Files
Diffstat (limited to 'binaryviewtype.cpp')
| -rw-r--r-- | binaryviewtype.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/binaryviewtype.cpp b/binaryviewtype.cpp index af6fd290..cb8abea8 100644 --- a/binaryviewtype.cpp +++ b/binaryviewtype.cpp @@ -71,8 +71,8 @@ BinaryViewType::BinaryViewType(BNBinaryViewType* type) } -BinaryViewType::BinaryViewType(const string& name, const string& longName): - m_nameForRegister(name), m_longNameForRegister(longName) +BinaryViewType::BinaryViewType(const string& name, const string& longName) : + m_nameForRegister(name), m_longNameForRegister(longName) { m_object = nullptr; } @@ -88,8 +88,8 @@ void BinaryViewType::Register(BinaryViewType* type) callbacks.getLoadSettingsForData = GetSettingsCallback; type->AddRefForRegistration(); - type->m_object = BNRegisterBinaryViewType(type->m_nameForRegister.c_str(), - type->m_longNameForRegister.c_str(), &callbacks); + type->m_object = + BNRegisterBinaryViewType(type->m_nameForRegister.c_str(), type->m_longNameForRegister.c_str(), &callbacks); } @@ -197,7 +197,8 @@ Ref<Platform> BinaryViewType::GetPlatform(uint32_t id, Architecture* arch) } -void BinaryViewType::RegisterPlatformRecognizer(uint64_t id, BNEndianness endian, const std::function<Ref<Platform>(BinaryView* view, Metadata* metadata)>& callback) +void BinaryViewType::RegisterPlatformRecognizer(uint64_t id, BNEndianness endian, + const std::function<Ref<Platform>(BinaryView* view, Metadata* metadata)>& callback) { PlatformRecognizerFunction* ctxt = new PlatformRecognizerFunction; ctxt->action = callback; @@ -207,7 +208,8 @@ void BinaryViewType::RegisterPlatformRecognizer(uint64_t id, BNEndianness endian Ref<Platform> BinaryViewType::RecognizePlatform(uint64_t id, BNEndianness endian, BinaryView* view, Metadata* metadata) { - BNPlatform* platform = BNRecognizePlatformForViewType(m_object, id, endian, view->GetObject(), metadata->GetObject()); + BNPlatform* platform = + BNRecognizePlatformForViewType(m_object, id, endian, view->GetObject(), metadata->GetObject()); if (!platform) return nullptr; return new Platform(platform); @@ -263,7 +265,7 @@ void BinaryViewType::BinaryViewEventCallback(void* ctxt, BNBinaryView* view) BNPlatform* BinaryViewType::PlatformRecognizerCallback(void* ctxt, BNBinaryView* view, BNMetadata* metadata) { - PlatformRecognizerFunction* callback = (PlatformRecognizerFunction*) ctxt; + PlatformRecognizerFunction* callback = (PlatformRecognizerFunction*)ctxt; Ref<BinaryView> viewObject = new BinaryView(BNNewViewReference(view)); Ref<Metadata> metadataObject = new Metadata(BNNewMetadataReference(metadata)); Ref<Platform> result = callback->action(viewObject, metadataObject); @@ -273,9 +275,7 @@ BNPlatform* BinaryViewType::PlatformRecognizerCallback(void* ctxt, BNBinaryView* } -CoreBinaryViewType::CoreBinaryViewType(BNBinaryViewType* type): BinaryViewType(type) -{ -} +CoreBinaryViewType::CoreBinaryViewType(BNBinaryViewType* type) : BinaryViewType(type) {} BinaryView* CoreBinaryViewType::Create(BinaryView* data) |
