Improve const-correctness.
This avoids some pedantic compiler warnings and also removes any
non-shared data from the squirrel core.
Before:
size --totals sqstdlib/*.o squirrel/*.o
text data bss dec hex filename
261270 3776 0 265046 40b56 (TOTALS)
After:
size --totals sqstdlib/*.o squirrel/*.o
text data bss dec hex filename
265046 0 0 265046 40b56 (TOTALS)
This commit is contained in:
@@ -59,7 +59,7 @@ SINGLE_ARG_FUNC(ceil)
|
||||
SINGLE_ARG_FUNC(exp)
|
||||
|
||||
#define _DECL_FUNC(name,nparams,tycheck) {_SC(#name),math_##name,nparams,tycheck}
|
||||
static SQRegFunction mathlib_funcs[] = {
|
||||
static const SQRegFunction mathlib_funcs[] = {
|
||||
_DECL_FUNC(sqrt,2,_SC(".n")),
|
||||
_DECL_FUNC(sin,2,_SC(".n")),
|
||||
_DECL_FUNC(cos,2,_SC(".n")),
|
||||
|
||||
Reference in New Issue
Block a user