choos uuid generator platform-specific
This commit is contained in:
parent
22ae5aedf2
commit
2cc7a288fe
1 changed files with 4 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue