eliminate intellisense warnings.

OCD kind of stuff. Visual Studio complains about these, but they aren't
really anything severe.
This commit is contained in:
Enno Rehling 2014-02-16 13:47:53 -08:00
parent 3e2ee057c6
commit 8e611d759d
5 changed files with 7 additions and 7 deletions

View File

@ -127,11 +127,11 @@ static int tolua_faction_set_magic(lua_State * L)
{ {
faction *self = (faction *) tolua_tousertype(L, 1, 0); faction *self = (faction *) tolua_tousertype(L, 1, 0);
const char *type = tolua_tostring(L, 2, 0); const char *type = tolua_tostring(L, 2, 0);
magic_t mtype; int mtype;
for (mtype = 0; mtype != MAXMAGIETYP; ++mtype) { for (mtype = 0; mtype != MAXMAGIETYP; ++mtype) {
if (strcmp(magic_school[mtype], type) == 0) { if (strcmp(magic_school[mtype], type) == 0) {
self->magiegebiet = mtype; self->magiegebiet = (magic_t)mtype;
break; break;
} }
} }

View File

@ -23,7 +23,7 @@ static int tolua_run_mapper(lua_State * L)
static int tolua_highlight_region(lua_State * L) static int tolua_highlight_region(lua_State * L)
{ {
region *r = tolua_tousertype(L, 1, 0); region *r = (region *)tolua_tousertype(L, 1, 0);
int select = tolua_toboolean(L, 2, 0); int select = tolua_toboolean(L, 2, 0);
highlight_region(r, select); highlight_region(r, select);
return 0; return 0;

View File

@ -273,7 +273,7 @@ static int tolua_unit_get_magic(lua_State * L)
static void unit_setmagic(unit * u, const char *type) static void unit_setmagic(unit * u, const char *type)
{ {
sc_mage *mage = get_mage(u); sc_mage *mage = get_mage(u);
magic_t mtype; int mtype;
for (mtype = 0; mtype != MAXMAGIETYP; ++mtype) { for (mtype = 0; mtype != MAXMAGIETYP; ++mtype) {
if (strcmp(magic_school[mtype], type) == 0) if (strcmp(magic_school[mtype], type) == 0)
break; break;
@ -281,7 +281,7 @@ static void unit_setmagic(unit * u, const char *type)
if (mtype == MAXMAGIETYP) if (mtype == MAXMAGIETYP)
return; return;
if (mage == NULL) { if (mage == NULL) {
mage = create_mage(u, mtype); mage = create_mage(u, (magic_t)mtype);
} }
} }

View File

@ -3404,7 +3404,7 @@ fighter *make_fighter(battle * b, unit * u, side * s1, bool attack)
for (itm = u->items; itm; itm = itm->next) { for (itm = u->items; itm; itm = itm->next) {
if (itm->type->rtype->atype) { if (itm->type->rtype->atype) {
if (i_canuse(u, itm->type)) { if (i_canuse(u, itm->type)) {
struct armor *adata = malloc(sizeof(armor)), **aptr; struct armor *adata = (struct armor *)malloc(sizeof(armor)), **aptr;
adata->atype = itm->type->rtype->atype; adata->atype = itm->type->rtype->atype;
adata->count = itm->number; adata->count = itm->number;
for (aptr = &fig->armors; *aptr; aptr = &(*aptr)->next) { for (aptr = &fig->armors; *aptr; aptr = &(*aptr)->next) {

View File

@ -376,7 +376,7 @@ const building_type *findbuildingtype(const char *name,
quicklist *ql = buildingtypes; quicklist *ql = buildingtypes;
int qi; int qi;
bn = calloc(sizeof(local_names), 1); bn = (local_names *)calloc(sizeof(local_names), 1);
bn->next = bnames; bn->next = bnames;
bn->lang = lang; bn->lang = lang;