diff options
Diffstat (limited to 'core/io/resource.cpp')
-rw-r--r-- | core/io/resource.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/core/io/resource.cpp b/core/io/resource.cpp index d117f86f39..553698f8a6 100644 --- a/core/io/resource.cpp +++ b/core/io/resource.cpp @@ -93,15 +93,14 @@ String Resource::get_path() const { String Resource::generate_scene_unique_id() { // Generate a unique enough hash, but still user-readable. // If it's not unique it does not matter because the saver will try again. - OS::Date date = OS::get_singleton()->get_date(); - OS::Time time = OS::get_singleton()->get_time(); + OS::DateTime dt = OS::get_singleton()->get_datetime(); uint32_t hash = hash_murmur3_one_32(OS::get_singleton()->get_ticks_usec()); - hash = hash_murmur3_one_32(date.year, hash); - hash = hash_murmur3_one_32(date.month, hash); - hash = hash_murmur3_one_32(date.day, hash); - hash = hash_murmur3_one_32(time.hour, hash); - hash = hash_murmur3_one_32(time.minute, hash); - hash = hash_murmur3_one_32(time.second, hash); + hash = hash_murmur3_one_32(dt.year, hash); + hash = hash_murmur3_one_32(dt.month, hash); + hash = hash_murmur3_one_32(dt.day, hash); + hash = hash_murmur3_one_32(dt.hour, hash); + hash = hash_murmur3_one_32(dt.minute, hash); + hash = hash_murmur3_one_32(dt.second, hash); hash = hash_murmur3_one_32(Math::rand(), hash); static constexpr uint32_t characters = 5; |