mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
AK: Remove clear() from FixedArray and fixate its allocation guarantees
FixedArray always *almost* had the following allocation guarantees: There is (possibly) one allocation in the constructor and one (or more) deallocation(s) in the destructor. No other operation allocates or deallocates. With this removal of the public clear() method, which nobody except the test used anyways, those guarantees are now completely true and furthermore fixated with an explanatory comment.
This commit is contained in:
parent
9bf2d0b718
commit
1d144ed6fc
2 changed files with 3 additions and 8 deletions
|
@ -23,7 +23,4 @@ TEST_CASE(ints)
|
|||
EXPECT_EQ(ints[0], 0);
|
||||
EXPECT_EQ(ints[1], 1);
|
||||
EXPECT_EQ(ints[2], 2);
|
||||
|
||||
ints.clear();
|
||||
EXPECT_EQ(ints.size(), 0u);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue