choos uuid generator platform-specific

This commit is contained in:
Martin Brodbeck 2018-08-01 10:13:26 +02:00
parent 22ae5aedf2
commit 2cc7a288fe

View file

@ -9,7 +9,11 @@ Entity::~Entity() = default;
void Entity::createUuid() void Entity::createUuid()
{ {
#if defined __linux__
static boost::uuids::random_generator generator{}; static boost::uuids::random_generator generator{};
#elif defined __WIN32
static boost::uuids::random_generator_mt19937 generator{};
#endif
uuid_ = generator(); uuid_ = generator();
} }