Browse Source

constexpr fixes for md5.hpp

default_compile_flags
vector-of-bool 5 years ago
parent
commit
db8d0d8efb
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/browns/md5.hpp

+ 2
- 2
src/browns/md5.hpp View File

} }


constexpr static std::byte* _le_copy(std::uint64_t n, std::byte* ptr) noexcept { constexpr static std::byte* _le_copy(std::uint64_t n, std::byte* ptr) noexcept {
auto n_ptr = reinterpret_cast<const std::byte*>(&n);
auto n_ptr = neo::byte_pointer(&n);
auto n_end = n_ptr + sizeof n; auto n_end = n_ptr + sizeof n;
while (n_ptr != n_end) { while (n_ptr != n_end) {
*ptr++ = *n_ptr++; *ptr++ = *n_ptr++;
} }
digest_type ret = {}; digest_type ret = {};
auto data = neo::byte_pointer(_running_digest.data()); auto data = neo::byte_pointer(_running_digest.data());
auto dest = ret.data();
auto dest = ret.begin();
auto dest_end = ret.end(); auto dest_end = ret.end();
while (dest != dest_end) { while (dest != dest_end) {
*dest++ = *data++; *dest++ = *data++;

Loading…
Cancel
Save