clang-modernize -loop-convert

and some manual adjustments
clang-modernize -add-override
clang-modernize -use-nullptr

and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
Merge pull request #142 from Tilka/clang-modernize

Run clang-modernize and manually fix the result