diff --git a/AK/TypedTransfer.h b/AK/TypedTransfer.h index 614b42afa9..44b1c884c9 100644 --- a/AK/TypedTransfer.h +++ b/AK/TypedTransfer.h @@ -33,14 +33,14 @@ namespace AK { template class TypedTransfer { public: - static size_t move(T* destination, T* source, size_t count) + static void move(T* destination, T* source, size_t count) { if (!count) - return 0; + return; if constexpr (Traits::is_trivial()) { __builtin_memmove(destination, source, count * sizeof(T)); - return count; + return; } for (size_t i = 0; i < count; ++i) { @@ -50,7 +50,7 @@ public: new (&destination[count - i - 1]) T(AK::move(source[count - i - 1])); } - return count; + return; } static size_t copy(T* destination, const T* source, size_t count)