mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-04 14:05:10 +08:00
Yet another fix of next_highest_power_of_2() on clang
This commit is contained in:
parent
1c06a170c4
commit
85bc3af88a
@ -116,10 +116,12 @@ inline uint64_t next_highest_power_of_2(uint64_t v)
|
|||||||
// gives a duplicate symbol error.
|
// gives a duplicate symbol error.
|
||||||
inline size_t next_highest_power_of_2(size_t v)
|
inline size_t next_highest_power_of_2(size_t v)
|
||||||
{
|
{
|
||||||
#if sizeof(size_t) == sizeof(uint32_t)
|
#if SSIZE_MAX == 9223372036854775807
|
||||||
return next_highest_power_of_2(uint32_t(v));
|
static_assert(sizeof(size_t) == sizeof(uint64_t));
|
||||||
#else
|
|
||||||
return next_highest_power_of_2(uint64_t(v));
|
return next_highest_power_of_2(uint64_t(v));
|
||||||
|
#else
|
||||||
|
static_assert(sizeof(size_t) == sizeof(uint32_t));
|
||||||
|
return next_highest_power_of_2(uint32_t(v));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user