You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
This commit is contained in:
@@ -42,9 +42,9 @@ bool MeshInstance3D::_set(const StringName &p_name, const Variant &p_value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Map<StringName, int>::Element *E = blend_shape_properties.find(p_name);
|
||||
HashMap<StringName, int>::Iterator E = blend_shape_properties.find(p_name);
|
||||
if (E) {
|
||||
set_blend_shape_value(E->get(), p_value);
|
||||
set_blend_shape_value(E->value, p_value);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ bool MeshInstance3D::_get(const StringName &p_name, Variant &r_ret) const {
|
||||
return false;
|
||||
}
|
||||
|
||||
const Map<StringName, int>::Element *E = blend_shape_properties.find(p_name);
|
||||
HashMap<StringName, int>::ConstIterator E = blend_shape_properties.find(p_name);
|
||||
if (E) {
|
||||
r_ret = get_blend_shape_value(E->get());
|
||||
r_ret = get_blend_shape_value(E->value);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user