mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 09:20:28 +03: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
Notes:
sideshowbarker
2024-07-17 02:23:25 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/d43d51eedc Pull-request: https://github.com/SerenityOS/serenity/pull/18821 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -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 New Issue
Block a user