CleverRaven/Cataclysm-DDA — pull request #8487 by Anrock (2014-08-08 10:05:33+00:00)
Title: Constify itype and creature and it's derived classes

See issue #529

Almost everything changed here is getters, so there shouldn't be any potential bugs.

There is Creature::get_killer, that returns pointer and comment states that get_killer is actually also a setter. So either get_killer shouldn't be const or, better, there should be dedicated setter for it. Please review.

Also, there is a bunch of player::SkillLevel methods. Sometimes (most of the time, i believe) there are used just to check\read and sometimes to actually modify skill. So i added two more const SkillLevel& player::SkillLevel(smth) const methods, that use std::map::at instead of std::map::operator[]. Question is: is there situations when new skills are added to player's _skill map (except player init\constructor)? If there are none, then i suggest using std::map::at instead of operator[] everywhere regarding _skill map. That would add safety and eliminate potential hard-to-detect typo-bugs (i.e. you want to check mechanics skill and call skillLevel("mechSnics"), get some default value and also add "mechsnics" skill).