Skip to content

Commit

Permalink
Fix MSVC compiler warnings about hiding declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
jyrkive committed May 17, 2017
1 parent 597099a commit 9eae9ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/ai/formula/candidates.cpp
Expand Up @@ -222,7 +222,6 @@ void attack_candidate_action::evaluate(ai::formula_ai* ai, unit_map& units)

for( size_t my_unit = 0 ; my_unit < my_units_flt.size() ; ++my_unit){
auto my_unit_callable = my_units_flt[my_unit].convert_to<unit_callable>();
auto enemy_unit_callable = my_units_flt[my_unit].convert_to<unit_callable>();
for( size_t enemy_unit = 0 ; enemy_unit < enemy_units_flt.size() ; ++enemy_unit){
auto enemy_unit_callable = enemy_units_flt[enemy_unit].convert_to<unit_callable>();
if(ai->can_reach_unit(my_unit_callable->get_location(), enemy_unit_callable->get_location())) {
Expand Down
6 changes: 3 additions & 3 deletions src/scripting/lua_audio.cpp
Expand Up @@ -156,9 +156,9 @@ static int intf_music_next(lua_State*) {
}

static int intf_music_add(lua_State* L) {
int i = -1;
int index = -1;
if(lua_isinteger(L, 1)) {
i = lua_tointeger(L, 1);
index = lua_tointeger(L, 1);
lua_remove(L, 1);
}
config cfg = config_of
Expand Down Expand Up @@ -186,7 +186,7 @@ static int intf_music_add(lua_State* L) {
return luaL_argerror(L, i, "unrecognized argument");
}
}
sound::play_music_config(cfg, i);
sound::play_music_config(cfg, index);
return 0;
}

Expand Down

0 comments on commit 9eae9ea

Please sign in to comment.