From 068aea660c124b5bf93cffffb2b1c242817af9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Thu, 13 Jan 2022 10:50:31 +0100 Subject: [PATCH] AK: Explain why FixedArray has no move assignment --- AK/FixedArray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/FixedArray.h b/AK/FixedArray.h index 9085399798..e5e3e9fab1 100644 --- a/AK/FixedArray.h +++ b/AK/FixedArray.h @@ -55,7 +55,7 @@ public: 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 const&) = delete; FixedArray& operator=(FixedArray const&) = delete; @@ -66,7 +66,7 @@ public: other.m_size = 0; 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& operator=(FixedArray&&) = delete; ~FixedArray()