adds code comments for a number of method declarations in header,
and in the implementation file, prefixes many method calls with
`this->`. This convention disambiguates whether the call is a method
of the class or a function at global scope. On some projects like
gcc, it is part of the coding standard to do this to avoid subtle
bugs -- I have come to believe that it makes your code more easily
readable, even if it is a little more typing.
gfgtdf noticed that sometimes, if lua generates text or error messages
which looks like pango formatting, it breaks the markup in the lua
console. the problem was that each unit of text generated by lua
needs to be run individually throw font::escape_text. We identified
the problem but for whatever reason didn't fix it back then, and
put a fixme note instead. This is a proper patch that fixes the issue.
The vision filter should reflect whatever a player playing the
respective side would see. Previously, any unit with the hides ability
active was excluded from matching irrespective of what side it was on,
even though hidden units of both own and allied sides are always seen
(as long as they are not under shroud or fog when vision is not shared,
but that's covered separately).
An extension of af73336, hopefully this will remove some more of the warnings which pop up in MSVC compilation. Also try to use more explanatory variable names as code should generally be self-documenting and easy to read.
This helper function was added to assist with dialog callbacks that took more than just a twindow argument.
However, now that we use C++11, a lambda is a cleaner solution.
This commit still doesn't fix all of them. I decided to leave alone
cases where variables with the same name are assigned in multiple
conditions of the same if...else if...else statement, and cases where a
scope logging macro is used multiple times in the same scope. In any
case, this commit greatly reduces the warning count on MSVC2015 and makes
new warnings much easier to spot.
This is similar to "Draw Hex Coordinates" and "Draw Terrain Codes", and displays the number of terrain graphics surfaces draw for each hex. It is useful for spotting mistakes such as overlay images having non-transparent pixels in adjacent hexes where they shouldn't, or for comparing the efficiency of different kinds of terrain graphics rules.