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.
This commit is contained in:
parent
71219b8a1d
commit
667b417d9f
Notes:
sideshowbarker
2024-07-18 22:31:08 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/667b417d9fb Pull-request: https://github.com/SerenityOS/serenity/pull/5258
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue