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

It's only ever used as one
This commit is contained in:
Lioncash 2016-09-13 21:16:04 -04:00
parent 0ac77b0288
commit 00ddbee786
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ struct Symbol
int numCalls = 0;
Type type = Type::Function;
int index = 0; // only used for coloring the disasm view
int analyzed = 0;
bool analyzed = false;
};
enum

View File

@ -75,7 +75,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size)
{
if (!func.name.size())
func.name = StringFromFormat("zz_%07x_", startAddr & 0x0FFFFFF);
if (func.analyzed >= 1)
if (func.analyzed)
return true; // No error, just already did it.
func.calls.clear();
@ -96,7 +96,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size)
if (max_size && func.size > max_size)
{
func.address = startAddr;
func.analyzed = 1;
func.analyzed = true;
func.hash = SignatureDB::ComputeCodeChecksum(startAddr, addr);
if (numInternalBranches == 0)
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.
// Let's calc the checksum and get outta here
func.address = startAddr;
func.analyzed = 1;
func.analyzed = true;
func.hash = SignatureDB::ComputeCodeChecksum(startAddr, addr);
if (numInternalBranches == 0)
func.flags |= FFLAG_STRAIGHT;