SymbolDB: Change Symbol's 'analyzed' member into a boolean

It's only ever used as one
This commit is contained in:
Lioncash committed 2016-09-13 21:23:28 -04:00
1 parent 0ac77b0288
commit 00ddbee786
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -39,7 +39,7 @@ struct Symbol
int numCalls = 0; int numCalls = 0;
Type type = Type::Function; Type type = Type::Function;
int index = 0; // only used for coloring the disasm view int index = 0; // only used for coloring the disasm view
int analyzed = 0; bool analyzed = false;
}; };
enum enum
+3 -3
View File
@@ -75,7 +75,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size)
{ {
if (!func.name.size()) if (!func.name.size())
func.name = StringFromFormat("zz_%07x_", startAddr & 0x0FFFFFF); func.name = StringFromFormat("zz_%07x_", startAddr & 0x0FFFFFF);
if (func.analyzed >= 1) if (func.analyzed)
return true; // No error, just already did it. return true; // No error, just already did it.
func.calls.clear(); func.calls.clear();
@@ -96,7 +96,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size)
if (max_size && func.size > max_size) if (max_size && func.size > max_size)
{ {
func.address = startAddr; func.address = startAddr;
func.analyzed = 1; func.analyzed = true;
func.hash = SignatureDB::ComputeCodeChecksum(startAddr, addr); func.hash = SignatureDB::ComputeCodeChecksum(startAddr, addr);
if (numInternalBranches == 0) if (numInternalBranches == 0)
func.flags |= FFLAG_STRAIGHT; func.flags |= FFLAG_STRAIGHT;
@@ -117,7 +117,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size)
// We're done! Looks like we have a neat valid function. Perfect. // We're done! Looks like we have a neat valid function. Perfect.
// Let's calc the checksum and get outta here // Let's calc the checksum and get outta here
func.address = startAddr; func.address = startAddr;
func.analyzed = 1; func.analyzed = true;
func.hash = SignatureDB::ComputeCodeChecksum(startAddr, addr); func.hash = SignatureDB::ComputeCodeChecksum(startAddr, addr);
if (numInternalBranches == 0) if (numInternalBranches == 0)
func.flags |= FFLAG_STRAIGHT; func.flags |= FFLAG_STRAIGHT;