calref / cboe

Classic Blades of Exile
http://spiderwebforums.ipbhost.com/index.php?/forum/12-blades-of-exile/
Other
169 stars 41 forks source link

Fix GCC build issue with ambiguous for loop iterator #189

Closed akien-mga closed 6 years ago

akien-mga commented 6 years ago

Previous code would raise this error with GCC 5.5.0:

build/obj/scenario/monster.cpp:804:19: error: use of 'abil' before deduction of 'auto'
  for(auto& abil : abil) {
                   ^

I'd advise to do some further refactoring to prevent confusion between the public abil which is a map of two types of abilities, and the various local abils that shadow it in monster.cpp.