choos uuid generator platform-specific

This commit is contained in:
Martin Brodbeck 2018-08-01 10:13:26 +02:00
parent 22ae5aedf2
commit 2cc7a288fe
1 changed files with 4 additions and 0 deletions

View File

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