godot/core/templates
Rémi Verschelde 7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
..
bin_sorted_array.h Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
command_queue_mt.cpp
command_queue_mt.h
cowdata.h Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
hash_map.h clang-format: Various fixes to comments alignment from clang-format 13 2021-10-28 15:43:36 +02:00
hashfuncs.h
list.h clang-format: Various fixes to comments alignment from clang-format 13 2021-10-28 15:43:36 +02:00
local_vector.h Don't return reference on copy assignment operators 2021-11-30 16:26:29 +01:00
lru.h
map.h
oa_hash_map.h Don't return reference on copy assignment operators 2021-11-30 16:26:29 +01:00
ordered_hash_map.h Don't return reference on copy assignment operators 2021-11-30 16:26:29 +01:00
paged_allocator.h
paged_array.h
pair.h
pass_func.h
pooled_list.h
rid_owner.cpp
rid_owner.h
rid.h
ring_buffer.h
safe_list.h
safe_refcount.h
SCsub
search_array.h
self_list.h
set.h
simple_type.h
sort_array.h
thread_work_pool.cpp [OS] Add ThreadWorkPool default size to OS. 2021-11-02 04:16:00 +01:00
thread_work_pool.h ThreadWorkPool no longer starts worker threads if given zero work. 2021-11-01 19:19:25 +00:00
vector.h Don't return reference on copy assignment operators 2021-11-30 16:26:29 +01:00
vmap.h Don't return reference on copy assignment operators 2021-11-30 16:26:29 +01:00
vset.h Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00