Merge pull request #115093 from Ivorforce/hashmap-explicit-copy
Change copy constructors of `HashMap` and `AHashMap` from implicit to explicit
This commit is contained in:
commit
429750f60b
30 changed files with 34 additions and 35 deletions
|
|
@ -1640,7 +1640,7 @@ void ProjectSettings::_bind_methods() {
|
|||
|
||||
void ProjectSettings::_add_builtin_input_map() {
|
||||
if (InputMap::get_singleton()) {
|
||||
HashMap<String, List<Ref<InputEvent>>> builtins = InputMap::get_singleton()->get_builtins();
|
||||
HashMap<String, List<Ref<InputEvent>>> builtins(InputMap::get_singleton()->get_builtins());
|
||||
|
||||
for (KeyValue<String, List<Ref<InputEvent>>> &E : builtins) {
|
||||
Array events;
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins_with_featur
|
|||
}
|
||||
|
||||
void InputMap::load_default() {
|
||||
HashMap<String, List<Ref<InputEvent>>> builtins = get_builtins_with_feature_overrides_applied();
|
||||
HashMap<String, List<Ref<InputEvent>>> builtins(get_builtins_with_feature_overrides_applied());
|
||||
|
||||
for (const KeyValue<String, List<Ref<InputEvent>>> &E : builtins) {
|
||||
String name = E.key;
|
||||
|
|
|
|||
|
|
@ -673,7 +673,7 @@ public:
|
|||
p_other._size = 0;
|
||||
}
|
||||
|
||||
AHashMap(const AHashMap &p_other) {
|
||||
explicit AHashMap(const AHashMap &p_other) {
|
||||
_init_from(p_other);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ public:
|
|||
|
||||
/* Constructors */
|
||||
|
||||
HashMap(const HashMap &p_other) {
|
||||
explicit HashMap(const HashMap &p_other) {
|
||||
reserve(hash_table_size_primes[p_other._capacity_idx]);
|
||||
|
||||
if (p_other._size == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue