]> git.lizzy.rs Git - minetest.git/commit
Optimize random turns in dungeongen (#8129)
authorJozef Behran <jozuejozef@gmail.com>
Sun, 7 Apr 2019 17:08:27 +0000 (12:08 -0500)
committerSmallJoker <SmallJoker@users.noreply.github.com>
Sun, 7 Apr 2019 17:08:27 +0000 (19:08 +0200)
commit0c90ab4f6c8f0e4ddb1e674736bec5165278327d
treeb2ef3976fc9430142e6f69942e2d8133af8d1505
parent25f231a0e023b0ace5604f167b5189529bd2598f
Optimize random turns in dungeongen (#8129)

It turns out there is no need to return the new value and
preserve the old one in random_turn, the procedure can be
made to modify the value in-place. This saves quite a bunch
of parameter and return value copying.
src/mapgen/dungeongen.cpp
src/mapgen/dungeongen.h