light/modules/engine/src/core/uuid.cpp

13 lines
299 B
C++
Raw Normal View History

2025-07-05 13:28:41 +03:30
#include <engine/core/uuid.hpp>
2025-07-11 00:05:48 +03:30
namespace lt {
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> {};
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