Codestyle cleanup (mods.cpp, mapgen_math.cpp)

Fixes warnings mentioned in #1348 (except those in connection.cpp)