From 086435bd364505f7e05c8a83e48e8b5bec30c94d Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Wed, 15 Feb 2023 17:24:20 -0500 Subject: Remove legacy BNDB Merge Tool --- filemetadata.cpp | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'filemetadata.cpp') diff --git a/filemetadata.cpp b/filemetadata.cpp index b6a839b6..0a12eb00 100644 --- a/filemetadata.cpp +++ b/filemetadata.cpp @@ -270,28 +270,6 @@ bool FileMetadata::CreateSnapshotedView(BinaryView* data, const std::string& vie } -MergeResult FileMetadata::MergeUserAnalysis( - const std::string& name, const std::function& progress, std::vector excludedHashes) -{ - size_t numHashes = excludedHashes.size(); - char** tempList = new char*[numHashes]; - for (size_t i = 0; i < numHashes; i++) - tempList[i] = BNAllocString(excludedHashes[i].c_str()); - - ProgressContext cb; - cb.callback = progress; - - BNMergeResult bnResult = - BNMergeUserAnalysis(m_object, name.c_str(), &cb, ProgressCallback, tempList, numHashes); - MergeResult result(bnResult); - - for (size_t i = 0; i < numHashes; i++) - BNFreeString(tempList[i]); - delete[] tempList; - return result; -} - - void FileMetadata::BeginUndoActions() { BNBeginUndoActions(m_object); @@ -355,7 +333,7 @@ vector FileMetadata::GetUndoEntries() continue; UndoEntry temp; temp.timestamp = entries[i].timestamp; - temp.hash = entries[i].hash; + temp.id = entries[i].id; temp.user = new User(BNNewUserReference(entries[i].user)); size_t actionCount = entries[i].actionCount; for (size_t actionIndex = 0; actionIndex < actionCount; actionIndex++) @@ -383,7 +361,7 @@ vector FileMetadata::GetRedoEntries() continue; UndoEntry temp; temp.timestamp = entries[i].timestamp; - temp.hash = entries[i].hash; + temp.id = entries[i].id; temp.user = new User(BNNewUserReference(entries[i].user)); size_t actionCount = entries[i].actionCount; for (size_t actionIndex = 0; actionIndex < actionCount; actionIndex++) @@ -407,7 +385,7 @@ std::optional FileMetadata::GetLastUndoEntry() UndoEntry entry; entry.timestamp = bnEntry.timestamp; - entry.hash = bnEntry.hash; + entry.id = bnEntry.id; entry.user = new User(BNNewUserReference(bnEntry.user)); size_t actionCount = bnEntry.actionCount; for (size_t actionIndex = 0; actionIndex < actionCount; actionIndex++) @@ -428,7 +406,7 @@ std::optional FileMetadata::GetLastRedoEntry() UndoEntry entry; entry.timestamp = bnEntry.timestamp; - entry.hash = bnEntry.hash; + entry.id = bnEntry.id; entry.user = new User(BNNewUserReference(bnEntry.user)); size_t actionCount = bnEntry.actionCount; for (size_t actionIndex = 0; actionIndex < actionCount; actionIndex++) -- cgit v1.3.1