actually may be better as a static (possibly inline) function
This commit is contained in:
parent
3ef067f6d1
commit
12b71f4c0c
|
@ -15,7 +15,20 @@
|
|||
enum { WM_EDITCHEAT = WM_USER + 0x120 };
|
||||
enum { UM_CHANGECODEEXTENSION = WM_USER + 0x121 };
|
||||
|
||||
extern int is_valid_hex_digit(char symbol);
|
||||
static int is_valid_hex_digit(char symbol)
|
||||
{
|
||||
if (symbol < '0')
|
||||
return 0; /* no valid hex figures before '0' */
|
||||
if (symbol <= '9')
|
||||
return 1;
|
||||
|
||||
symbol &= ~0x20; /* in ASCII, forces lowercase to uppercase */
|
||||
if (symbol < 'A')
|
||||
return 0;
|
||||
if (symbol <= 'Z')
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
CCheats::CCheats (const CN64Rom * Rom ) :
|
||||
m_Rom(Rom),
|
||||
|
@ -1914,18 +1927,3 @@ stdstr CCheats::ReadOptionsString(HWND hDlg, bool &/*validcodes*/, bool &validop
|
|||
if (numoptions < 1) validoptions = false;
|
||||
return optionsstring;
|
||||
}
|
||||
|
||||
int is_valid_hex_digit(char symbol)
|
||||
{
|
||||
if (symbol < '0')
|
||||
return 0; /* no valid hex figures before '0' */
|
||||
if (symbol <= '9')
|
||||
return 1;
|
||||
|
||||
symbol &= ~0x20; /* in ASCII, forces lowercase to uppercase */
|
||||
if (symbol < 'A')
|
||||
return 0;
|
||||
if (symbol <= 'Z')
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue