From 0206fb6f3dc59ebea776bb0afc03fc1eae261b44 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Tue, 27 Aug 2024 11:12:51 -0300 Subject: [PATCH] CI fixes --- src/base/blob.hpp | 5 +++-- src/primitives/common.hpp | 9 ++++----- src/verification/authority/impl/schedule_node.hpp | 2 +- src/verification/finality/voter_set.hpp | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/base/blob.hpp b/src/base/blob.hpp index 53622685..78fb2caf 100644 --- a/src/base/blob.hpp +++ b/src/base/blob.hpp @@ -39,8 +39,9 @@ namespace sgns::base { * @brief constructor enabling initializer list * @param l initializer list */ - explicit Blob(const std::array &l) { - std::copy(l.begin(), l.end(), this->begin()); + explicit constexpr Blob( const std::array &l ) + { + std::copy( l.begin(), l.end(), this->begin() ); } /** diff --git a/src/primitives/common.hpp b/src/primitives/common.hpp index 8a7a5683..9ee64bfd 100644 --- a/src/primitives/common.hpp +++ b/src/primitives/common.hpp @@ -1,5 +1,3 @@ - - #ifndef SUPERGENIUS_SRC_PRIMITIVES_COMMON_HPP #define SUPERGENIUS_SRC_PRIMITIVES_COMMON_HPP @@ -19,10 +17,11 @@ namespace sgns::primitives { // (BlockInfo, Prevote, Precommit, PrimaryPropose) template struct BlockInfoT : public boost::equality_comparable> { - BlockInfoT() = default; + constexpr BlockInfoT() = default; - BlockInfoT(const BlockNumber &n, const BlockHash &h) - : block_number(n), block_hash(h) {} + constexpr BlockInfoT( BlockNumber n, BlockHash h ) : block_number( n ), block_hash( h ) + { + } BlockNumber block_number{}; BlockHash block_hash; diff --git a/src/verification/authority/impl/schedule_node.hpp b/src/verification/authority/impl/schedule_node.hpp index f47d004e..42a794c1 100644 --- a/src/verification/authority/impl/schedule_node.hpp +++ b/src/verification/authority/impl/schedule_node.hpp @@ -27,7 +27,7 @@ namespace sgns::authority { std::shared_ptr makeDescendant( const primitives::BlockInfo &block, bool finalized = false); - const primitives::BlockInfo block; + const primitives::BlockInfo block{}; std::weak_ptr parent; std::vector> descendants; diff --git a/src/verification/finality/voter_set.hpp b/src/verification/finality/voter_set.hpp index dda33cf1..67de3340 100644 --- a/src/verification/finality/voter_set.hpp +++ b/src/verification/finality/voter_set.hpp @@ -4,6 +4,7 @@ #define SUPERGENIUS_SRC_VERIFICATION_FINALITY_VOTER_SET_HPP #include +#include #include "verification/finality/common.hpp"