Added a proper contructor to CHEATF_SUBFAST struct to fix clang compiler initializer warning.

This commit is contained in:
harry 2023-01-20 22:02:32 -05:00
parent 8fc3ea8ba2
commit f0a4e8bd11
2 changed files with 9 additions and 3 deletions

View File

@ -59,7 +59,7 @@ void FCEU_CheatAddRAM(int s, uint32 A, uint8 *p)
}
CHEATF_SUBFAST SubCheats[256] = { 0 };
CHEATF_SUBFAST SubCheats[256];
uint32 numsubcheats = 0;
int globalCheatDisabled = 0;
int disableAutoLSCheats = 0;

View File

@ -33,12 +33,18 @@ extern int disableAutoLSCheats;
int FCEU_DisableAllCheats(void);
int FCEU_DeleteAllCheats(void);
typedef struct {
struct CHEATF_SUBFAST
{
uint16 addr;
uint8 val;
int compare;
readfunc PrevRead;
} CHEATF_SUBFAST;
CHEATF_SUBFAST(void)
{
addr = 0; val = 0; compare = 0; PrevRead = nullptr;
}
};
struct CHEATF {
struct CHEATF *next;