mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +00:00
AK: Explain why FixedArray has no move assignment
This commit is contained in:
parent
594bbbf020
commit
068aea660c
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/068aea660c1 Pull-request: https://github.com/SerenityOS/serenity/pull/11844 Reviewed-by: https://github.com/bgianfo Reviewed-by: https://github.com/linusg
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ public:
|
||||||
return MUST(try_clone());
|
return MUST(try_clone());
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Nobody can ever use these functions, since it would be impossible to make them OOM-safe due to their signatures. We just explicitly delete them.
|
// Nobody can ever use these functions, since it would be impossible to make them OOM-safe due to their signatures. We just explicitly delete them.
|
||||||
FixedArray(FixedArray<T> const&) = delete;
|
FixedArray(FixedArray<T> const&) = delete;
|
||||||
FixedArray<T>& operator=(FixedArray<T> const&) = delete;
|
FixedArray<T>& operator=(FixedArray<T> const&) = delete;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ public:
|
||||||
other.m_size = 0;
|
other.m_size = 0;
|
||||||
other.m_elements = nullptr;
|
other.m_elements = nullptr;
|
||||||
}
|
}
|
||||||
// NOTE: Nobody uses this function, so we just explicitly delete it.
|
// This function would violate the contract, as it would need to deallocate this FixedArray. As it also has no use case, we delete it.
|
||||||
FixedArray<T>& operator=(FixedArray<T>&&) = delete;
|
FixedArray<T>& operator=(FixedArray<T>&&) = delete;
|
||||||
|
|
||||||
~FixedArray()
|
~FixedArray()
|
||||||
|
|
Loading…
Reference in a new issue