From fd188ddd5176390efb22ed041d8aedad25d81dee Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 7 Jun 2019 13:07:57 -0300 Subject: Initial work on Vulkan: -Added VulkanContext -Added an X11 implementation -Added a rendering device abstraction -added a Vulkan rendering device abstraction -Engine does not work, only shows Godot logo (run it from bin/) --- core/oa_hash_map.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'core') diff --git a/core/oa_hash_map.h b/core/oa_hash_map.h index 7407c52816..182ed8b116 100644 --- a/core/oa_hash_map.h +++ b/core/oa_hash_map.h @@ -240,6 +240,22 @@ public: return false; } + /** + * returns true if the value was found, false otherwise. + * + * if r_data is not NULL then the value will be written to the object + * it points to. + */ + TValue *lookup_ptr(const TKey &p_key) const { + uint32_t pos = 0; + bool exists = _lookup_pos(p_key, pos); + + if (exists) { + return &values[pos]; + } + return NULL; + } + _FORCE_INLINE_ bool has(const TKey &p_key) const { uint32_t _pos = 0; return _lookup_pos(p_key, _pos); -- cgit v1.2.3