mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-11 01:01:48 +08:00
size_t is not uint32_t or uint64_t on GCC
This commit is contained in:
parent
d00fc9a0a8
commit
c762166974
@ -110,6 +110,17 @@ inline uint64_t next_highest_power_of_2(uint64_t v)
|
||||
return ++ v;
|
||||
}
|
||||
|
||||
#ifdef __GNUC__
|
||||
inline size_t next_highest_power_of_2(size_t v)
|
||||
{
|
||||
#if sizeof(size_t) == sizeof(uint32_t)
|
||||
return next_highest_power_of_2(uint32_t(v));
|
||||
#else
|
||||
return next_highest_power_of_2(uint64_t(v));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
extern std::string xml_escape(std::string text);
|
||||
|
||||
} // namespace Slic3r
|
||||
|
Loading…
x
Reference in New Issue
Block a user