mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:17:44 +00:00
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
1 changed files with 4 additions and 4 deletions
|
@ -33,14 +33,14 @@ namespace AK {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class TypedTransfer {
|
class TypedTransfer {
|
||||||
public:
|
public:
|
||||||
static size_t move(T* destination, T* source, size_t count)
|
static void move(T* destination, T* source, size_t count)
|
||||||
{
|
{
|
||||||
if (!count)
|
if (!count)
|
||||||
return 0;
|
return;
|
||||||
|
|
||||||
if constexpr (Traits<T>::is_trivial()) {
|
if constexpr (Traits<T>::is_trivial()) {
|
||||||
__builtin_memmove(destination, source, count * sizeof(T));
|
__builtin_memmove(destination, source, count * sizeof(T));
|
||||||
return count;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < count; ++i) {
|
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]));
|
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)
|
static size_t copy(T* destination, const T* source, size_t count)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue