Merge branch 'master' into jgrpp
# Conflicts: # src/elrail.cpp # src/ground_vehicle.hpp # src/landscape.cpp # src/saveload/afterload.cpp # src/saveload/saveload.h # src/tile_cmd.h # src/town_cmd.cpp # src/tunnelbridge_cmd.cpp
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
* @return The selected bits, aligned to a LSB.
|
||||
*/
|
||||
template <typename T>
|
||||
debug_inline static uint GB(const T x, const uint8 s, const uint8 n)
|
||||
debug_inline constexpr static uint GB(const T x, const uint8 s, const uint8 n)
|
||||
{
|
||||
return (x >> s) & (((T)1U << n) - 1);
|
||||
}
|
||||
|
@@ -224,7 +224,7 @@ static inline bool IsInsideBS(const T x, const size_t base, const size_t size)
|
||||
* @see IsInsideBS()
|
||||
*/
|
||||
template <typename T>
|
||||
static inline bool IsInsideMM(const T x, const size_t min, const size_t max)
|
||||
static inline constexpr bool IsInsideMM(const T x, const size_t min, const size_t max)
|
||||
{
|
||||
return (size_t)(x - min) < (max - min);
|
||||
}
|
||||
|
Reference in New Issue
Block a user