mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
AK: Add FIXMEs to HashMap copy-construct and copy-assign
This underlines that we still copy-construct and copy-assign HashMaps. Primarily, this makes it easier to develop towards OOM-safe(r) internal data structures, by providing a reminder (the FIXME) and an easy error- checking switch (just change it to "delete" to see some of the errors).
This commit is contained in:
parent
12d1ddbde5
commit
d43d51eedc
|
@ -40,6 +40,11 @@ public:
|
|||
set(item.key, item.value);
|
||||
}
|
||||
|
||||
HashMap(HashMap const&) = default; // FIXME: Not OOM-safe! Use clone() instead.
|
||||
HashMap(HashMap&& other) noexcept = default;
|
||||
HashMap& operator=(HashMap const& other) = default; // FIXME: Not OOM-safe! Use clone() instead.
|
||||
HashMap& operator=(HashMap&& other) noexcept = default;
|
||||
|
||||
[[nodiscard]] bool is_empty() const
|
||||
{
|
||||
return m_table.is_empty();
|
||||
|
|
Loading…
Reference in a new issue