Fix GCC build issue with ambiguous for loop iterator #189

Merged
akien-mga merged 1 commits from gcc-auto-iterator into master 2018-04-05 13:03:12 +00:00
akien-mga commented 2018-04-05 09:24:28 +00:00 (Migrated from github.com)

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.

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 `abil`s that shadow it in monster.cpp.
Sign in to join this conversation.
No description provided.