diff options
author | Haru <haru@dotalux.com> | 2014-01-12 19:02:37 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-01-12 19:08:40 +0100 |
commit | cd1d0867a006f6a6eb4330142ad3006d37e20684 (patch) | |
tree | f84f6840a4170fe606af5af6e30ed62a3a3225a4 /src/map/script.c | |
parent | fbd5113e258bd511f948d3d583845d89ac8ec216 (diff) | |
download | hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.tar.gz hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.tar.bz2 hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.tar.xz hercules-cd1d0867a006f6a6eb4330142ad3006d37e20684.zip |
Changed some void* to the correct data types where applicable
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/map/script.c b/src/map/script.c index d36b1103a..cadf36820 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -2837,20 +2837,20 @@ int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, co i64db_put(n, num, aStrdup(str)); if( script_getvaridx(num) ) script->array_update( - (name[1] == '@') ? - &st->stack->array_function_db : - &st->script->script_arrays_db, - num, - false); + (name[1] == '@') ? + &st->stack->array_function_db : + &st->script->script_arrays_db, + num, + false); } else { i64db_remove(n, num); if( script_getvaridx(num) ) script->array_update( - (name[1] == '@') ? - &st->stack->array_function_db : - &st->script->script_arrays_db, - num, - true); + (name[1] == '@') ? + &st->stack->array_function_db : + &st->script->script_arrays_db, + num, + true); } } } @@ -2908,20 +2908,20 @@ int set_reg(struct script_state* st, TBL_PC* sd, int64 num, const char* name, co i64db_iput(n, num, val); if( script_getvaridx(num) ) script->array_update( - (name[1] == '@') ? - &st->stack->array_function_db : - &st->script->script_arrays_db, - num, - false); + (name[1] == '@') ? + &st->stack->array_function_db : + &st->script->script_arrays_db, + num, + false); } else { i64db_remove(n, num); if( script_getvaridx(num) ) script->array_update( - (name[1] == '@') ? - &st->stack->array_function_db : - &st->script->script_arrays_db, - num, - true); + (name[1] == '@') ? + &st->stack->array_function_db : + &st->script->script_arrays_db, + num, + true); } } } @@ -4113,15 +4113,15 @@ void script_setarray_pc(struct map_session_data* sd, const char* varname, uint32 * Clears persistent variables from memory **/ int script_reg_destroy(DBKey key, DBData *data, va_list ap) { - void *src; + struct script_reg_state *src; if( data->type != DB_DATA_PTR )/* got no need for those! */ return 0; src = DB->data2ptr(data); - if( ((struct script_reg_state*)src)->type ) { - struct script_reg_str *p = src; + if( src->type ) { + struct script_reg_str *p = (struct script_reg_str *)src; if( p->value ) aFree(p->value); |