From 935acdcc79d1dc5ac04a83b92e5919ddbfa29329 Mon Sep 17 00:00:00 2001 From: pasta Date: Wed, 19 Oct 2022 15:16:04 -0500 Subject: refactor: modernize the implementation of uint256.* - Constructors of uint256 to utilize Span instead of requiring a std::vector - converts m_data into a std::array - Prefers using `WIDTH` instead of `sizeof(m_data)` - make all the things constexpr - replace C style functions with c++ equivalents - memset -> std::fill - memcpy -> std::copy Note: In practice, implementations of std::copy avoid multiple assignments and use bulk copy functions such as std::memmove if the value type is TriviallyCopyable and the iterator types satisfy LegacyContiguousIterator. (https://en.cppreference.com/w/cpp/algorithm/copy) - memcmp -> std::memcmp --- src/consensus/params.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/consensus') diff --git a/src/consensus/params.h b/src/consensus/params.h index 7c35222713..3b5eb1034d 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace Consensus { -- cgit v1.2.3