TheDarklingWolf/Cataclysm-DDA — pull request #899 by Xantrim (2013-05-08 20:24:45+00:00)
Title: Fix for undefined behaviour regarding variadic functions and references

I tried to compile the source on MSVC2012, which lead to an interesting error:
setvector crashed the game.

After some research, I found this:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/1995/N0695.pdf

In short: using a reference as the last argument before the ellipsis operator in a variadic function leads to undefined behaviour. In this fix, I changed it to a pointer and updated all calls to it.

MSVC also complained about the fact, that this is invalid:
for(iterator it = bla.begin()++; ...)

And it is partially right. It's not wrong, but the increment has no effect here. As far as I can tell, this only affects full enumerations of containers, so I just discarded it. If the first element should be skipped, you could use bla.begin()+1, but you must make sure to not skip past .end() in case of an empty container.