Use size abbreviations
This commit is contained in:
parent
e4661f035b
commit
54ed439cce
5 changed files with 14 additions and 14 deletions
|
@ -61,7 +61,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#define VERSION_RMAP 0x10000
|
||||
#define VERSION_IVFC 0x20000
|
||||
|
||||
#define SAVE_BLOCK_SIZE_DEFAULT 0x4000
|
||||
#define SAVE_BLOCK_SIZE_DEFAULT SZ_16K
|
||||
|
||||
#define SAVE_NUM_HEADERS 2
|
||||
|
||||
|
@ -232,6 +232,6 @@ typedef struct {
|
|||
};
|
||||
} save_header_t;
|
||||
|
||||
static_assert(sizeof(save_header_t) == 0x4000, "Save header size is wrong!");
|
||||
static_assert(sizeof(save_header_t) == SZ_16K, "Save header size is wrong!");
|
||||
|
||||
#endif
|
||||
|
|
|
@ -41,7 +41,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#include <stdint.h>
|
||||
|
||||
#define RMAP_ALIGN_SMALL 0x200
|
||||
#define RMAP_ALIGN_LARGE 0x4000
|
||||
#define RMAP_ALIGN_LARGE SZ_16K
|
||||
|
||||
typedef struct {
|
||||
uint32_t magic; /* RMAP */
|
||||
|
|
|
@ -250,7 +250,7 @@ uint32_t save_fs_list_allocate_entry(save_filesystem_list_ctx_t *ctx) {
|
|||
if (capacity == 0 || length >= capacity) {
|
||||
uint64_t current_size, new_size;
|
||||
save_allocation_table_storage_get_size(&ctx->storage, ¤t_size);
|
||||
if (!save_allocation_table_storage_set_size(&ctx->storage, current_size + 0x4000))
|
||||
if (!save_allocation_table_storage_set_size(&ctx->storage, current_size + SZ_16K))
|
||||
return 0;
|
||||
save_allocation_table_storage_get_size(&ctx->storage, &new_size);
|
||||
if (!save_fs_list_set_capacity(ctx, (uint32_t)(new_size / sizeof(save_fs_list_entry_t))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue