The gcc-4.8 patch requires travis to download and install gcc-4.8
from an ubuntu ppa. This takes a few mintues and the gcc build is
already fairly close to the timelimit, so this change can push
some builds over the edge. Since it doesn't seem to be strictly
necessary right now, I comment out the code for v 4.8 install.
This commit adds a dedicated recall list manager class.
The purpose of this is to
- Simplify the code that interacts with the recall list. Prior to
the commit most such code was based on iteration with explicit
iterators, and called global helper functions implemented in
unit.cpp to wrap the code that finds a unit in a vector. It turns
out that interacting with the recall list was the *only* use of
that code, so we make it a member function of the recall list
manager and take it out of unit.cpp.
Most of the code that touches the recall list was previously
7 or 8 lines with a for loop, now it tends to be 1 or 2 lines,
although further refactor may be possible.
- Improve encapsulation. This makes it possible to track how
other classes are interacting with the recall list, and may
make it easier to debug recall list problems by adding debugging
output to the class.
The scoped_ptr<unit> construct which was used previously in
actions/create.cpp is unnecessary after this commit, and it seems
like it could be related to this error report:
http://wesnoth.org:8080/job/Wesnoth/branch=master,compiler=default,label=Debian7-64/185/consoleText
The most significant change of this commit is that
unit_creator::add_unit now does not make a "temporary" unit
instance from the cfg, and then copy construct it. From source
inspection that step appears to be unnecessary, and it somewhat
obfuscates the meaning of this code in actions/create.cpp
This allows us to eliminate two headers and move code out of
play_controller, and keep related code together. The cache is
now a static variable in the only function that calls it.