Commit Graph

74 Commits

Author SHA1 Message Date
Jonathan G Rennison
914da4bdb9 Fix 1e0bea5b: Incorrect extern declarations 2021-11-03 01:18:36 +00:00
Jonathan G Rennison
de5de583e3 Rationalise FIND_FIRST_BIT/FindFirstBit2x64
Use builtins for FindFirstBit2x64.
Apply and masks to prevent undefined behaviour if inputs out of range
2021-11-01 23:14:29 +00:00
Jonathan G Rennison
1e0bea5b8d Replace FindFirstBit/FindFirstBit64 with a single template function 2021-11-01 23:00:44 +00:00
Jonathan G Rennison
d585ce75dd Use bitmath builtins for SetBitIterator when available 2021-11-01 22:11:27 +00:00
Jonathan G Rennison
f54d69a60a Merge branch 'master' into jgrpp-beta
# Conflicts:
#	src/economy.cpp
#	src/elrail.cpp
#	src/graph_gui.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/core/game_info.cpp
#	src/newgrf_station.cpp
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/strings_func.h
#	src/table/settings/network_settings.ini
#	src/table/settings/settings.ini
2021-11-01 21:18:24 +00:00
glx22
ce813ce644 Cleanup: Remove now unused FOR_EACH_SET_BIT_EX macro 2021-07-09 21:36:09 +02:00
glx22
89ab8b79a5 Codechange: Remove FOR_EACH_SET_BIT 2021-07-09 21:36:09 +02:00
Jonathan G Rennison
563037e401 Add brackets around bitmath macro definitions 2020-04-26 09:22:25 +01:00
Jonathan G Rennison
cbdd9f84d8 Merge branch 'master' into jgrpp
# Conflicts:
#	src/console_gui.cpp
#	src/lang/korean.txt
#	src/video/sdl2_v.cpp
#	src/video/sdl2_v.h
#	src/window.cpp
#	src/window_gui.h
2019-11-12 18:43:10 +00:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Nikolas Nyby
28e11623bd Codechange: math functions - use cpp-style casts 2019-08-31 20:27:56 +01:00
Jonathan G Rennison
62713ad106 Fix missing declaration in c8a37d82 2019-08-24 03:41:08 +01:00
Jonathan G Rennison
4b9a4ae695 Use consistent casts/types for byte swap functions 2019-08-19 20:25:53 +01:00
Jonathan G Rennison
c8a37d8292 Add 64 bit FindFirstBit function 2019-08-19 20:01:49 +01:00
Jonathan G Rennison
326b3aa66a Merge branch 'save_ext' into jgrpp 2019-06-08 12:52:04 +01:00
Jonathan G Rennison
43ddaf4c5c Fix incorrect implementation of non-builtin BSWAP64 2019-06-08 12:50:57 +01:00
Jonathan G Rennison
962a9c5430 Merge branch 'master' into cpp-11
# Conflicts:
#	config.lib
#	projects/openttd_vs100.vcxproj
#	projects/openttd_vs100.vcxproj.filters
#	projects/openttd_vs80.vcproj
#	projects/openttd_vs90.vcproj
#	src/saveload/saveload.cpp
2019-01-06 22:07:28 +00:00
Jonathan G Rennison
e735c1a51a Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/autoreplace_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/script_station.hpp
#	src/track_func.h
#	src/vehicle_base.h
2018-11-05 12:53:36 +00:00
frosch
18ca3e8660 Fix: [NewGRF] Make VA2 operator 11 (ror) behave well-defined when rotating by 0 bits. 2018-10-31 14:35:46 +01:00
Jonathan G Rennison
fd4d9591c1 Merge branch 'save_ext' into jgrpp 2018-06-06 01:56:07 +01:00
Jonathan G Rennison
6862343eb3 Fix wrong type cast in Apple BSWAP64 macro 2018-06-06 01:38:05 +01:00
Jonathan G Rennison
159909f4b1 Merge branch 'save_ext' into jgrpp
# Conflicts:
#	src/saveload/saveload.cpp
2018-05-29 12:23:56 +01:00
Jonathan G Rennison
9ca4e915ba Add 64 bit byte swapping function 2018-05-28 02:20:30 +01:00
Jonathan G Rennison
0bd33eff1e Fixes use of builtins in CountBits for small and/or signed input types. 2016-09-12 18:37:28 +01:00
Jonathan G Rennison
a8e0862500 Enable prefetch and bswap buitins for clang. 2016-09-08 20:00:56 +01:00
Jonathan G Rennison
349cd8a6f0 Where possible use compiler builtins for CountBits and FindFirstBit. 2016-09-04 18:01:38 +01:00
michi_cc
8bb76958fa (svn r25685) -Codechange: [OSX] Use non-deprecated functions for byte swapping. 2013-08-05 20:37:29 +00:00
michi_cc
de097dd989 (svn r25685) -Codechange: [OSX] Use non-deprecated functions for byte swapping. 2013-08-05 20:37:29 +00:00
rubidium
13c769ff00 (svn r24959) -Doc [FS#5459]: that certain parameters need to be within certain boundaries 2013-02-02 20:18:41 +00:00
rubidium
6be79c424d (svn r24959) -Doc [FS#5459]: that certain parameters need to be within certain boundaries 2013-02-02 20:18:41 +00:00
alberth
19adc87262 (svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb) 2012-12-01 13:12:39 +00:00
alberth
732e073261 (svn r24776) -Doc: Typo fixes, additions, and additional dots collected from various sources (including Eagle_rainbow, MinchinWeb) 2012-12-01 13:12:39 +00:00
truebrain
aa1a0053b0 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 2011-12-20 17:57:56 +00:00
truebrain
1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 2011-12-20 17:57:56 +00:00
glx
d4fc5bf88d (svn r22898) -Codechange: use MSVC compiler intrinsics for byte swapping 2011-09-06 00:10:20 +00:00
glx
2c20738067 (svn r22898) -Codechange: use MSVC compiler intrinsics for byte swapping 2011-09-06 00:10:20 +00:00
alberth
5a18e4820a (svn r20838) -Fix [FS#4136]: Cast '1' in bitmath functions to width of result before shifting. 2010-09-22 20:59:24 +00:00
alberth
b3270caaf1 (svn r20838) -Fix [FS#4136]: Cast '1' in bitmath functions to width of result before shifting. 2010-09-22 20:59:24 +00:00
frosch
5b86c79fce (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
frosch
ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
alberth
1743c86610 (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
alberth
a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
rubidium
115a4ee734 (svn r19789) -Add [FS#3519]: a typed FOR_EACH_SET_BIT (adf88) 2010-05-11 20:59:54 +00:00
rubidium
2c25f51281 (svn r19789) -Add [FS#3519]: a typed FOR_EACH_SET_BIT (adf88) 2010-05-11 20:59:54 +00:00
rubidium
ee02599bbf (svn r19788) -Codechange: make FOR_EACH_SET_BIT not change the value of the passed bit variable, i.e. allow expressions as parameter 2010-05-11 20:48:06 +00:00
rubidium
be504a6ef0 (svn r19788) -Codechange: make FOR_EACH_SET_BIT not change the value of the passed bit variable, i.e. allow expressions as parameter 2010-05-11 20:48:06 +00:00
smatz
6c1ab1a2fa (svn r19019) -Codechange: use HasExactlyOneBit() and HasAtMostOneBit() instead of CountBits() where possible 2010-02-05 17:05:58 +00:00
smatz
d62d0ac489 (svn r19019) -Codechange: use HasExactlyOneBit() and HasAtMostOneBit() instead of CountBits() where possible 2010-02-05 17:05:58 +00:00
rubidium
99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
rubidium
7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00