Skip to content

Commit 589f7f3

Browse files
committedFeb 20, 2025·
fix for clang-tidy use after move error.
1 parent 4f765d7 commit 589f7f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/app/data-model-provider/tests/TestMetadataList.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ TEST_F(TestMetadataList, BufferMoveOperationsWork)
226226
/// move constructor called for the second time here
227227
GenericAppendOnlyBuffer newBuffer{ std::move(originalBuffer) };
228228

229-
ASSERT_EQ(originalBuffer.Size(), size_t{ 0 });
230-
ASSERT_TRUE(originalBuffer.IsEmpty());
229+
ASSERT_EQ(originalBuffer.Size(), size_t{ 0 }); // NOLINT(bugprone-use-after-move)
230+
ASSERT_TRUE(originalBuffer.IsEmpty()); // NOLINT(bugprone-use-after-move)
231231

232232
ASSERT_EQ(newBuffer.Size(), size_t{ 3 });
233233
ASSERT_FALSE(newBuffer.IsEmpty());
@@ -262,8 +262,8 @@ TEST_F(TestMetadataList, BufferMoveOperationsWork)
262262
originalBuffer = std::move(anotherBuffer);
263263

264264
ASSERT_EQ(originalBuffer.Size(), size_t{ 2 });
265-
ASSERT_EQ(anotherBuffer.Size(), size_t{ 0 });
266-
ASSERT_TRUE(anotherBuffer.IsEmpty());
265+
ASSERT_EQ(anotherBuffer.Size(), size_t{ 0 }); // NOLINT(bugprone-use-after-move)
266+
ASSERT_TRUE(anotherBuffer.IsEmpty()); // NOLINT(bugprone-use-after-move)
267267
}
268268
}
269269
} // namespace

0 commit comments

Comments
 (0)
Please sign in to comment.