mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::buffer: Remove builtin requiring constexpr size for clang-11.
This commit is contained in:
parent
e1df7629b5
commit
c5478cd151
2 changed files with 2 additions and 14 deletions
|
@ -72,13 +72,7 @@ ircd::buffer::copy(char *&dest,
|
|||
assert(!overlap(const_buffer(dest, cpsz), src));
|
||||
assert(cpsz <= size(src));
|
||||
assert(cpsz <= remain);
|
||||
|
||||
#if __has_builtin(__builtin_memcpy_inline) && !defined(RB_GENERIC)
|
||||
__builtin_memcpy_inline(dest, data(src), cpsz);
|
||||
#else
|
||||
__builtin_memcpy(dest, data(src), cpsz);
|
||||
#endif
|
||||
|
||||
dest += cpsz;
|
||||
assert(dest <= stop);
|
||||
return dest;
|
||||
|
|
|
@ -57,13 +57,7 @@ ircd::buffer::move(char *&dest,
|
|||
const size_t cpsz(std::min(size(src), remain));
|
||||
assert(cpsz <= size(src));
|
||||
assert(cpsz <= remain);
|
||||
|
||||
#if __has_builtin(__builtin_memmove_inline) && !defined(RB_GENERIC)
|
||||
__builtin_memmove_inline(dest, data(src), cpsz);
|
||||
#else
|
||||
__builtin_memmove(dest, data(src), cpsz);
|
||||
#endif
|
||||
|
||||
dest += cpsz;
|
||||
assert(dest <= stop);
|
||||
return dest;
|
||||
|
|
Loading…
Reference in a new issue