summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wiederhake <BenWiederhake.GitHub@gmx.de>2021-02-07 12:00:56 +0100
committerAndreas Kling <kling@serenityos.org>2021-02-08 18:03:57 +0100
commit667b417d9fbafce5e2fed805158b90304f0eb611 (patch)
tree8e7996f2c7f73e72127ab7f9b57152ee3533ebb5
parent71219b8a1d86353a47c0e0699771ba140a9979e9 (diff)
downloadserenity-667b417d9fbafce5e2fed805158b90304f0eb611.zip
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.
-rw-r--r--AK/TypedTransfer.h8
1 files 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<typename T>
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<T>::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)