Reorder structs, alignment

This commit is contained in:
twinaphex 2020-08-23 16:02:33 +02:00
parent edd2ef7b92
commit 86520cbd07
2 changed files with 9 additions and 9 deletions

View File

@ -29,8 +29,8 @@ typedef struct
{
uint8_t* data[MAX_MEMORY_REGIONS];
size_t size[MAX_MEMORY_REGIONS];
unsigned count;
size_t total_size;
unsigned count;
} rcheevos_memory_regions_t;
bool rcheevos_memory_init(rcheevos_memory_regions_t* regions, int console);

View File

@ -29,6 +29,14 @@
#define CHEEVOS_JSON_KEY_SUCCESS 0x110461deU
#define CHEEVOS_JSON_KEY_ERROR 0x0d2011cfU
typedef struct
{
const char *value;
int is_key;
size_t length;
unsigned key_hash;
} rcheevos_getvalueud_t;
/*****************************************************************************
Gets a value in a JSON
*****************************************************************************/
@ -44,14 +52,6 @@ static uint32_t rcheevos_djb2(const char* str, size_t length)
return hash;
}
typedef struct
{
unsigned key_hash;
int is_key;
const char* value;
size_t length;
} rcheevos_getvalueud_t;
static int rcheevos_getvalue_key(void* userdata,
const char* name, size_t length)
{