1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 03:47:34 +00:00

Everywhere: Remove pessimizing and redundant move()

This commit is contained in:
Andreas Kling 2021-03-17 16:30:02 +01:00
parent fa28cc85e6
commit f59ad2dc57
9 changed files with 11 additions and 11 deletions

View file

@ -58,7 +58,7 @@ TEST_CASE(should_construct_by_copy)
TEST_CASE(should_construct_by_move)
{
Counter c {};
AK::NeverDestroyed<Counter> n { AK::move(c) };
AK::NeverDestroyed<Counter> n { move(c) };
EXPECT_EQ(0, n->num_copies);
EXPECT_EQ(1, n->num_moves);

View file

@ -45,9 +45,9 @@ public:
for (size_t i = 0; i < count; ++i) {
if (destination <= source)
new (&destination[i]) T(AK::move(source[i]));
new (&destination[i]) T(std::move(source[i]));
else
new (&destination[count - i - 1]) T(AK::move(source[count - i - 1]));
new (&destination[count - i - 1]) T(std::move(source[count - i - 1]));
}
return;