size_t is not uint32_t or uint64_t on GCC
This commit is contained in:
parent
d00fc9a0a8
commit
c762166974
1 changed files with 11 additions and 0 deletions
|
@ -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…
Reference in a new issue