2025-07-11 01:16:52 +03:30
|
|
|
#include <ecs/uuid.hpp>
|
2021-10-07 01:13:18 +03:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
namespace lt {
|
2021-10-07 01:13:18 +03:30
|
|
|
|
2025-07-06 14:02:50 +03:30
|
|
|
auto UUID::s_engine = std::mt19937_64(std::random_device()());
|
|
|
|
auto UUID::s_distribution = std::uniform_int_distribution<uint64_t> {};
|
2021-10-07 01:13:18 +03:30
|
|
|
|
2025-07-05 16:07:51 +03:30
|
|
|
UUID::UUID(uint64_t uuid /* = -1 */): m_uuid(uuid == -1 ? s_distribution(s_engine) : uuid)
|
2022-03-08 21:19:19 +03:30
|
|
|
{
|
|
|
|
}
|
2025-07-05 13:28:41 +03:30
|
|
|
|
2025-07-11 00:05:48 +03:30
|
|
|
} // namespace lt
|