From 667b417d9fbafce5e2fed805158b90304f0eb611 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sun, 7 Feb 2021 12:00:56 +0100 Subject: [PATCH] AK: remove unused and uninteresting return value The return value is always be 'count', even in the case of 0. Note that the return value of TypedTransfer::copy() is likewise uninteresting, but apparently it is beig used. Hence this patch does not touch it. --- AK/TypedTransfer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)