summaryrefslogtreecommitdiffstats
path: root/core/io/resource_uid.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/resource_uid.h')
-rw-r--r--core/io/resource_uid.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/core/io/resource_uid.h b/core/io/resource_uid.h
index 9f2ab5245b..da42553cf5 100644
--- a/core/io/resource_uid.h
+++ b/core/io/resource_uid.h
@@ -33,9 +33,8 @@
#include "core/object/ref_counted.h"
#include "core/string/string_name.h"
-#include "core/templates/ordered_hash_map.h"
+#include "core/templates/hash_map.h"
-class Crypto;
class ResourceUID : public Object {
GDCLASS(ResourceUID, Object)
public:
@@ -47,14 +46,14 @@ public:
static String get_cache_file();
private:
- mutable Ref<Crypto> crypto;
+ void *crypto = nullptr; // CryptoCore::RandomGenerator (avoid including crypto_core.h)
Mutex mutex;
struct Cache {
CharString cs;
bool saved_to_cache = false;
};
- OrderedHashMap<ID, Cache> unique_ids; //unique IDs and utf8 paths (less memory used)
+ HashMap<ID, Cache> unique_ids; //unique IDs and utf8 paths (less memory used)
static ResourceUID *singleton;
uint32_t cache_entries = 0;
@@ -67,7 +66,7 @@ public:
String id_to_text(ID p_id) const;
ID text_to_id(const String &p_text) const;
- ID create_id() const;
+ ID create_id();
bool has_id(ID p_id) const;
void add_id(ID p_id, const String &p_path);
void set_id(ID p_id, const String &p_path);