mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
fix clang-check warnings
This commit is contained in:
parent
4c23dc6adf
commit
17dcbe98ab
8 changed files with 8 additions and 12 deletions
|
|
@ -95,8 +95,8 @@ static inline FieldIncapatibilityType checkIncapatibility(
|
|||
|
||||
static inline integer_t clamp_value(integer_t value, FieldType type) {
|
||||
auto typesize = sizeof_type(type) * CHAR_BIT;
|
||||
integer_t minval = -(1 << (typesize-1));
|
||||
integer_t maxval = (1 << (typesize-1))-1;
|
||||
integer_t minval = -(1LL << (typesize-1));
|
||||
integer_t maxval = (1LL << (typesize-1))-1;
|
||||
return std::min(maxval, std::max(minval, value));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue