From 7e1260b52d59ac2d94268dc26dfb9672b4fe8d4e Mon Sep 17 00:00:00 2001
From: clc5q <clc5q@git.zephyr-software.com>
Date: Thu, 25 Jun 2015 20:13:52 +0000
Subject: [PATCH] Move 32 and 64-bit binary inits into base class.

Former-commit-id: b6de456fc5e5d88c17776959c098b58abe8d36df
---
 include/interfaces/abstract/STARSProgram.h |  4 ++--
 include/interfaces/idapro/STARSProgram.h   |  2 --
 src/interfaces/idapro/STARSIDAProgram.cpp  | 12 ------------
 src/interfaces/irdb/STARSIRDBProgram.cpp   | 12 ------------
 4 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/include/interfaces/abstract/STARSProgram.h b/include/interfaces/abstract/STARSProgram.h
index 585f82b2..06824bad 100644
--- a/include/interfaces/abstract/STARSProgram.h
+++ b/include/interfaces/abstract/STARSProgram.h
@@ -60,8 +60,8 @@ class STARS_Program_t
 		std::size_t GetFuncBoundsSize(void) const { return FuncBounds.size(); };
 
 		// Set (mutator) methods
-		virtual void Set32BitBinary(void) = 0; // Set internal state to handle a 32-bit binary
-		virtual void Set64BitBinary(void) = 0; // Set internal state to handle a 64-bit binary
+		void Set32BitBinary(void) { SetBitwidth32(); }; // Set internal state to handle a 32-bit binary
+		void Set64BitBinary(void) { SetBitwidth64(); }; // Set internal state to handle a 64-bit binary
 		void SetRootFileName(std::string NewName) { RootFileName = NewName; AnnotFileName = NewName + ".annot"; InfoAnnotFileName = NewName + ".infoannot"; };
 		void IncrementOptCount(std::size_t OptCategory) { ++OptCount[OptCategory]; }; // increment optimizing annotation count
 		void IncrementAnnotationCount(std::size_t OptCategory) { ++AnnotationCount[OptCategory]; }; // increment total annotation count
diff --git a/include/interfaces/idapro/STARSProgram.h b/include/interfaces/idapro/STARSProgram.h
index 834cddc3..dccb0d33 100644
--- a/include/interfaces/idapro/STARSProgram.h
+++ b/include/interfaces/idapro/STARSProgram.h
@@ -25,8 +25,6 @@ public:
 	// Get (accessor) methods
 
 	// Set (mutator) methods
-	void Set32BitBinary(void); // Set internal state to handle a 32-bit binary
-	void Set64BitBinary(void); // Set internal state to handle a 64-bit binary
 
 	// Query methods
 
diff --git a/src/interfaces/idapro/STARSIDAProgram.cpp b/src/interfaces/idapro/STARSIDAProgram.cpp
index f58affbc..5457b4d6 100644
--- a/src/interfaces/idapro/STARSIDAProgram.cpp
+++ b/src/interfaces/idapro/STARSIDAProgram.cpp
@@ -33,18 +33,6 @@ using namespace std;
 // Set to zero until we can do more precise analyses of indexed accesses.
 #define SMP_DETECT_INDEXED_ACCESSES 0
 
-// Set internal state to handle a 32-bit binary
-void STARS_IDA_Program_t::Set32BitBinary(void) {
-	STARS_Program_t::SetBitwidth32();
-	return;
-}
-
-// Set internal state to handle a 64-bit binary
-void STARS_IDA_Program_t::Set64BitBinary(void) {
-	STARS_Program_t::SetBitwidth64();
-	return;
-}
-
 // Set flags, take actions based on code size.
 void STARS_IDA_Program_t::ReportTotalCodeSize(unsigned long long TotalCodeSize) {
 	this->SetTotalCodeSize(TotalCodeSize);
diff --git a/src/interfaces/irdb/STARSIRDBProgram.cpp b/src/interfaces/irdb/STARSIRDBProgram.cpp
index 3c0304bd..681c5d5d 100644
--- a/src/interfaces/irdb/STARSIRDBProgram.cpp
+++ b/src/interfaces/irdb/STARSIRDBProgram.cpp
@@ -14,18 +14,6 @@ using namespace std;
 #define SMP_DEBUG 1
 
 
-// Set internal state to handle a 32-bit binary
-void STARS_IRDB_Program_t::Set32BitBinary(void) {
-	STARS_Program_t::SetBitwidth32();
-	return;
-}
-
-// Set internal state to handle a 64-bit binary
-void STARS_IRDB_Program_t::Set64BitBinary(void) {
-	STARS_Program_t::SetBitwidth64();
-	return;
-}
-
 // Set flags, take actions based on code size.
 void STARS_IRDB_Program_t::ReportTotalCodeSize(unsigned long long TotalCodeSize) {
 	this->SetTotalCodeSize(TotalCodeSize);
-- 
GitLab