0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 08:12:37 +01:00

ircd::buffer: Remove builtin requiring constexpr size for clang-11.

This commit is contained in:
Jason Volk 2020-10-28 11:38:13 -07:00
parent e1df7629b5
commit c5478cd151
2 changed files with 2 additions and 14 deletions

View file

@ -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
__builtin_memcpy(dest, data(src), cpsz);
dest += cpsz;
assert(dest <= stop);
return dest;

View file

@ -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
__builtin_memmove(dest, data(src), cpsz);
dest += cpsz;
assert(dest <= stop);
return dest;