]> git.lizzy.rs Git - dragonfireclient.git/commit
Use thread_local instead from some static settings (#5955)
authorLoïc Blot <nerzhul@users.noreply.github.com>
Sun, 11 Jun 2017 11:58:43 +0000 (13:58 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Jun 2017 11:58:43 +0000 (13:58 +0200)
commit65819f3b9f8229666a30b91ef2d289ebc6085097
tree722ba29a49ea1707c1db2633b2e84c5c7ebfe2eb
parentff73c7a5da6ab8ac0bb678ebf25b83e805397029
Use thread_local instead from some static settings (#5955)

thread_local permits to limit variable lifetime to thread duration. Use it on each setting place which uses static to cache variable result only for thread lifetime. This permits to keep the same performance level & reconfigure server from MT gui in those various variables places.

Add thread_local to undersampling calculation too.
src/drawscene.cpp
src/game.cpp
src/hud.cpp
src/mapblock_mesh.cpp
src/network/serverpackethandler.cpp
src/particles.cpp
src/server.cpp
src/serverenvironment.cpp