Skip to content
Snippets Groups Projects
user avatar
est31 authored
Cleanup:
	* Remove volatile keyword, it is of no use at all. [1]
	* Remove the enable_if stuff. It had no use either.
	  The most likely explanation why the enable_if stuff was there is that it
	  was used as something like a STATIC_ASSERT to verify that sizeof(T) is not larger
	  than sizeof(void *). This check however is not just misplaced in a place where we
	  already use a lock, it isn't needed at all, as gcc will just generate a call to
	  to the runtime if it compiles for platforms that don't support atomic instructions.
	  The runtime will then most likely use locks.

Code style fixes:
	* Prefix name of the mutex
	* Line everything up nicely, where it makes things look nice
	* Filling \ continuations with spaces is code style rule

Added operations on the atomic var:
	* Compare and swap
	* Swap

The second point of the cleanup also fixes the Android build of the next commit.

[1]: http://stackoverflow.com/q/2484980
abc354a5
History
Name Last commit Last update
..
cguittfont
client
gmp
json
lua
network
script
threading
unittest
util
CMakeLists.txt
activeobject.h
areastore.cpp
areastore.h
ban.cpp
ban.h
camera.cpp
camera.h
cavegen.cpp
cavegen.h
chat.cpp
chat.h
client.cpp
client.h
clientiface.cpp
clientiface.h
clientmap.cpp
clientmap.h
clientmedia.cpp
clientmedia.h
clientobject.cpp
clientobject.h
clientsimpleobject.h
clouds.cpp
clouds.h
cmake_config.h.in
cmake_config_githash.h.in
collision.cpp
collision.h
config.h
constants.h
content_abm.cpp
content_abm.h
content_cao.cpp
content_cao.h
content_cso.cpp
content_cso.h
content_mapblock.cpp
content_mapblock.h
content_mapnode.cpp
content_mapnode.h
content_nodemeta.cpp
content_nodemeta.h
content_sao.cpp
content_sao.h
convert_json.cpp
convert_json.h
craftdef.cpp
craftdef.h
database-dummy.cpp
database-dummy.h
database-leveldb.cpp
database-leveldb.h
database-redis.cpp
database-redis.h
database-sqlite3.cpp
database-sqlite3.h
database.cpp
database.h
daynightratio.h
debug.cpp
debug.h
defaultsettings.cpp
defaultsettings.h
drawscene.cpp
drawscene.h
dungeongen.cpp
dungeongen.h
emerge.cpp
emerge.h
environment.cpp
environment.h
event.h
event_manager.h
exceptions.h
filecache.cpp
filecache.h
filesys.cpp
filesys.h
fontengine.cpp
fontengine.h
game.cpp
game.h
gamedef.h
gameparams.h
genericobject.cpp
genericobject.h
gettext.cpp
gettext.h
gettime.h
guiChatConsole.cpp
guiChatConsole.h
guiEngine.cpp
guiEngine.h
guiFileSelectMenu.cpp
guiFileSelectMenu.h
guiFormSpecMenu.cpp
guiFormSpecMenu.h
guiKeyChangeMenu.cpp
guiKeyChangeMenu.h
guiMainMenu.h
guiPasswordChange.cpp
guiPasswordChange.h
guiTable.cpp
guiTable.h
guiVolumeChange.cpp
guiVolumeChange.h
guiscalingfilter.cpp
guiscalingfilter.h
httpfetch.cpp
httpfetch.h
hud.cpp
hud.h
imagefilters.cpp
imagefilters.h
intlGUIEditBox.cpp
intlGUIEditBox.h
inventory.cpp
inventory.h
inventorymanager.cpp
inventorymanager.h
irr_aabb3d.h
irr_v2d.h
irr_v3d.h
irrlichttypes.h
irrlichttypes_bloated.h
irrlichttypes_extrabloated.h
itemdef.cpp
itemdef.h
itemgroup.h
keycode.cpp
keycode.h
light.cpp
light.h
localplayer.cpp
localplayer.h
log.cpp
log.h
luaentity_common.h
main.cpp
mainmenumanager.h
map.cpp
map.h
mapblock.cpp
mapblock.h
mapblock_mesh.cpp
mapblock_mesh.h
mapgen.cpp
mapgen.h
mapgen_fractal.cpp
mapgen_fractal.h
mapgen_singlenode.cpp
mapgen_singlenode.h
mapgen_v5.cpp
mapgen_v5.h
mapgen_v6.cpp
mapgen_v6.h
mapgen_v7.cpp
mapgen_v7.h
mapnode.cpp
mapnode.h
mapsector.cpp
mapsector.h
mesh.cpp
mesh.h
mg_biome.cpp
mg_biome.h
mg_decoration.cpp
mg_decoration.h
mg_ore.cpp
mg_ore.h
mg_schematic.cpp
mg_schematic.h
minimap.cpp
minimap.h
modalMenu.h
modifiedstate.h
mods.cpp
mods.h
nameidmapping.cpp
nameidmapping.h
nodedef.cpp
nodedef.h
nodemetadata.cpp
nodemetadata.h
nodetimer.cpp
nodetimer.h
noise.cpp
noise.h
objdef.cpp