From 0edda2bd7f124256711de8e5ba2bab9e497781c7 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 12 Mar 2014 20:21:33 -0400 Subject: [PATCH] Fix a typo in DSPSymbols. (DisasssembleRange -> DisassembleRange) Also remove IsHexDigit and IsAlpha and replace them with their cctype equivalents. --- Source/Core/Core/HW/DSPLLE/DSPSymbols.cpp | 45 ++++------------------- 1 file changed, 7 insertions(+), 38 deletions(-) diff --git a/Source/Core/Core/HW/DSPLLE/DSPSymbols.cpp b/Source/Core/Core/HW/DSPLLE/DSPSymbols.cpp index 09609b6304..4b4ecfdb07 100644 --- a/Source/Core/Core/HW/DSPLLE/DSPSymbols.cpp +++ b/Source/Core/Core/HW/DSPLLE/DSPSymbols.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include #include #include #include @@ -14,7 +15,8 @@ #include "Core/DSP/DSPDisassembler.h" #include "Core/HW/DSPLLE/DSPSymbols.h" -namespace DSPSymbols { +namespace DSPSymbols +{ DSPSymbolDB g_dsp_symbol_db; @@ -73,42 +75,9 @@ Symbol *DSPSymbolDB::GetSymbolFromAddr(u32 addr) return nullptr; } -// lower case only -bool IsHexDigit(char c) +void DisassembleRange(u16 start, u16 end) { - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - return true; - default: - return false; - } -} - -bool IsAlpha(char c) -{ - return (c >= 'A' && c <= 'Z') || - (c >= 'a' && c <= 'z'); -} - -void DisasssembleRange(u16 start, u16 end) -{ - + // TODO: ? } bool ReadAnnotatedAssembly(const char *filename) @@ -141,7 +110,7 @@ bool ReadAnnotatedAssembly(const char *filename) for (unsigned int i = 0; i < strlen(line); i++) { const char c = line[i]; - if (IsHexDigit(c)) + if (isxdigit(c)) { if (first_hex == -1) { @@ -165,7 +134,7 @@ bool ReadAnnotatedAssembly(const char *filename) { first_hex = -1; } - if (IsAlpha(c)) + if (isalpha(c)) break; } }