Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions cute_tiled.h
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,6 @@ static void strpool_embedded_internal_expand_handles( strpool_embedded_t* pool )

static char* strpool_embedded_internal_get_data_storage( strpool_embedded_t* pool, int size, int* alloc_size )
{
char* data;
int i;
int offset;
if( size < (int)sizeof( strpool_embedded_internal_free_block_t ) ) size = sizeof( strpool_embedded_internal_free_block_t );
Expand Down Expand Up @@ -999,7 +998,7 @@ static char* strpool_embedded_internal_get_data_storage( strpool_embedded_t* poo

// Allocate a new block
pool->current_block = strpool_embedded_internal_add_block( pool, size > pool->block_size ? size : pool->block_size );
data = pool->blocks[ pool->current_block ].tail;
char *data = pool->blocks[ pool->current_block ].tail;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ANSI C89 requires variables to be declared at the beginning of a scope.

pool->blocks[ pool->current_block ].tail += size;
*alloc_size = size;
return data;
Expand All @@ -1013,8 +1012,6 @@ STRPOOL_EMBEDDED_U64 strpool_embedded_inject( strpool_embedded_t* pool, char con
int base_count;
int slot;
int first_free;
int handle_index;
strpool_embedded_internal_entry_t* entry;
int data_size;
char* data;
if( !string || length < 0 ) return 0;
Expand Down Expand Up @@ -1091,6 +1088,8 @@ STRPOOL_EMBEDDED_U64 strpool_embedded_inject( strpool_embedded_t* pool, char con
pool->hash_table[ slot ].entry_index = pool->entry_count;
++pool->hash_table[ base_slot ].base_count;

int handle_index;
strpool_embedded_internal_entry_t* entry;
Comment on lines 1090 to +1092
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

if( pool->handle_count < pool->handle_capacity )
{
handle_index = pool->handle_count;
Expand Down