1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-05 22:14:55 +00:00

AK: Suppress false positive readability-non-const-parameter in Function

In AK::Function::CallableWrapper::init_and_swap(), clang-tidy wants us
to mark the destination argument as pointer to const, which doesn't work
because we use placement new to construct a move'd *this into.
This commit is contained in:
Andrew Kaster 2021-10-31 15:23:41 -06:00 committed by Andreas Kling
parent 7014d37dd6
commit f32e185269

View File

@ -156,6 +156,7 @@ private:
delete this;
}
// NOLINTNEXTLINE(readability-non-const-parameter) False positive; destination is used in a placement new expression
void init_and_swap(u8* destination, size_t size) final override
{
VERIFY(size >= sizeof(CallableWrapper));