mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix non-const constexpr function call
This commit is contained in:
parent
b9440c0e9c
commit
15fc54b379
8 changed files with 124 additions and 58 deletions
|
@ -263,7 +263,7 @@ namespace sprout {
|
|||
;
|
||||
}
|
||||
SPROUT_CONSTEXPR sha1 const process_block() const {
|
||||
return process_block_1(h_[0], h_[1], h_[2], h_[3], h_[4]);
|
||||
return c_process_block();
|
||||
}
|
||||
SPROUT_CONSTEXPR sha1 const c_process_block() const {
|
||||
return process_block_1(h_[0], h_[1], h_[2], h_[3], h_[4]);
|
||||
|
@ -458,6 +458,21 @@ namespace sprout {
|
|||
}
|
||||
|
||||
SPROUT_CONSTEXPR sha1 const process_byte(std::uint8_t byte) const {
|
||||
return c_process_byte(byte);
|
||||
}
|
||||
template<typename InputIterator>
|
||||
SPROUT_CONSTEXPR sha1 const process_block(InputIterator bytes_begin, InputIterator bytes_end) const {
|
||||
return c_process_block(bytes_begin, bytes_end);
|
||||
}
|
||||
template<typename InputIterator>
|
||||
SPROUT_CONSTEXPR sha1 const process_bytes(InputIterator buffer, std::size_t byte_count) const {
|
||||
return c_process_bytes(buffer, byte_count);
|
||||
}
|
||||
template<typename InputRange>
|
||||
SPROUT_CONSTEXPR sha1 const process_range(InputRange const& bytes_range) const {
|
||||
return c_process_range(bytes_range);
|
||||
}
|
||||
SPROUT_CONSTEXPR sha1 const c_process_byte(std::uint8_t byte) const {
|
||||
return process(
|
||||
h_,
|
||||
sprout::fixed::set(block_, block_.begin() + block_byte_index_, byte),
|
||||
|
@ -466,19 +481,19 @@ namespace sprout {
|
|||
);
|
||||
}
|
||||
template<typename InputIterator>
|
||||
SPROUT_CONSTEXPR sha1 const process_block(InputIterator bytes_begin, InputIterator bytes_end) const {
|
||||
SPROUT_CONSTEXPR sha1 const c_process_block(InputIterator bytes_begin, InputIterator bytes_end) const {
|
||||
return process_block_impl(
|
||||
sprout::make_bytes_iterator(bytes_begin),
|
||||
sprout::make_bytes_iterator(bytes_end)
|
||||
);
|
||||
}
|
||||
template<typename InputIterator>
|
||||
SPROUT_CONSTEXPR sha1 const process_bytes(InputIterator buffer, std::size_t byte_count) const {
|
||||
return process_block(buffer, sprout::next(buffer, byte_count));
|
||||
SPROUT_CONSTEXPR sha1 const c_process_bytes(InputIterator buffer, std::size_t byte_count) const {
|
||||
return c_process_block(buffer, sprout::next(buffer, byte_count));
|
||||
}
|
||||
template<typename InputRange>
|
||||
SPROUT_CONSTEXPR sha1 const process_range(InputRange const& bytes_range) const {
|
||||
return process_block(sprout::begin(bytes_range), sprout::end(bytes_range));
|
||||
SPROUT_CONSTEXPR sha1 const c_process_range(InputRange const& bytes_range) const {
|
||||
return c_process_block(sprout::begin(bytes_range), sprout::end(bytes_range));
|
||||
}
|
||||
|
||||
SPROUT_CXX14_CONSTEXPR void process_byte(std::uint8_t byte) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue