From 86520cbd074dd7283065d167d994f6ae9f13fc58 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 23 Aug 2020 16:02:33 +0200 Subject: [PATCH] Reorder structs, alignment --- cheevos/cheevos_memory.h | 2 +- cheevos/cheevos_parser.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cheevos/cheevos_memory.h b/cheevos/cheevos_memory.h index 449b264b42..2ef7476990 100644 --- a/cheevos/cheevos_memory.h +++ b/cheevos/cheevos_memory.h @@ -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); diff --git a/cheevos/cheevos_parser.c b/cheevos/cheevos_parser.c index 79f8c17b5d..5710720031 100644 --- a/cheevos/cheevos_parser.c +++ b/cheevos/cheevos_parser.c @@ -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) {