size_t is not uint32_t or uint64_t on GCC

This commit is contained in:
bubnikv 2018-09-25 12:43:53 +02:00
parent d00fc9a0a8
commit c762166974

View file

@ -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