From 2cd4fd8972620737956aeeb4262209f8a446e3ee Mon Sep 17 00:00:00 2001 From: Jesus Ramirez Date: Wed, 26 Jun 2019 10:39:41 -0400 Subject: Changed the use of boost:value_initialized for C++ list initializer --- src/cryptonote_basic/miner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cryptonote_basic/miner.cpp') diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 2dad2795e..5c3332d93 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -100,7 +100,7 @@ namespace cryptonote miner::miner(i_miner_handler* phandler):m_stop(1), - m_template(boost::value_initialized()), + m_template(block{}), m_template_no(0), m_diffic(0), m_thread_index(0), -- cgit v1.2.3 From 4ad191ffa96a663c1fea61e5b5cd2e73770b43fa Mon Sep 17 00:00:00 2001 From: Lev Sizov Date: Mon, 2 Sep 2019 14:38:29 +0200 Subject: Removed unused boost/value_init header --- src/crypto/hash.h | 1 - src/cryptonote_basic/miner.cpp | 1 - src/wallet/wallet2.cpp | 1 - 3 files changed, 3 deletions(-) (limited to 'src/cryptonote_basic/miner.cpp') diff --git a/src/crypto/hash.h b/src/crypto/hash.h index 83278e659..e012d1bd3 100644 --- a/src/crypto/hash.h +++ b/src/crypto/hash.h @@ -32,7 +32,6 @@ #include #include -#include #include "common/pod-class.h" #include "generic-ops.h" diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 5c3332d93..602ced787 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -30,7 +30,6 @@ #include #include -#include #include #include #include "misc_language.h" diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index b43489021..f7e686dec 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 928f4be9531a40fcca92d9f878e08f8111254990 Mon Sep 17 00:00:00 2001 From: Lev Sizov Date: Thu, 5 Sep 2019 17:37:19 +0200 Subject: Make null hash constants constexpr Simplify m_template initialization in miner --- src/crypto/hash.h | 4 ++-- src/cryptonote_basic/miner.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cryptonote_basic/miner.cpp') diff --git a/src/crypto/hash.h b/src/crypto/hash.h index e012d1bd3..27184fa53 100644 --- a/src/crypto/hash.h +++ b/src/crypto/hash.h @@ -89,8 +89,8 @@ namespace crypto { epee::to_hex::formatted(o, epee::as_byte_span(v)); return o; } - const static crypto::hash null_hash = {}; - const static crypto::hash8 null_hash8 = {}; + constexpr static crypto::hash null_hash = {}; + constexpr static crypto::hash8 null_hash8 = {}; } CRYPTO_MAKE_HASHABLE(hash) diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp index 602ced787..856cccdeb 100644 --- a/src/cryptonote_basic/miner.cpp +++ b/src/cryptonote_basic/miner.cpp @@ -99,7 +99,7 @@ namespace cryptonote miner::miner(i_miner_handler* phandler):m_stop(1), - m_template(block{}), + m_template{}, m_template_no(0), m_diffic(0), m_thread_index(0), -- cgit v1.2.3