Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/addrman.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct AddressPosition {
const int bucket;
const int position;

bool operator==(AddressPosition other) {
bool operator==(AddressPosition other) const {
return std::tie(tried, multiplicity, bucket, position) ==
std::tie(other.tried, other.multiplicity, other.bucket, other.position);
}
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/hmac_sha256.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CHMAC_SHA256
CSHA256 inner;

public:
static const size_t OUTPUT_SIZE = 32;
static constexpr size_t OUTPUT_SIZE = 32;

CHMAC_SHA256(const unsigned char* key, size_t keylen);
CHMAC_SHA256& Write(const unsigned char* data, size_t len)
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/hmac_sha512.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CHMAC_SHA512
CSHA512 inner;

public:
static const size_t OUTPUT_SIZE = 64;
static constexpr size_t OUTPUT_SIZE = 64;

CHMAC_SHA512(const unsigned char* key, size_t keylen);
CHMAC_SHA512& Write(const unsigned char* data, size_t len)
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/ripemd160.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CRIPEMD160
uint64_t bytes{0};

public:
static const size_t OUTPUT_SIZE = 20;
static constexpr size_t OUTPUT_SIZE = 20;

CRIPEMD160();
CRIPEMD160& Write(const unsigned char* data, size_t len);
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/sha1.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CSHA1
uint64_t bytes{0};

public:
static const size_t OUTPUT_SIZE = 20;
static constexpr size_t OUTPUT_SIZE = 20;

CSHA1();
CSHA1& Write(const unsigned char* data, size_t len);
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/sha256.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class CSHA256
uint64_t bytes{0};

public:
static const size_t OUTPUT_SIZE = 32;
static constexpr size_t OUTPUT_SIZE = 32;

CSHA256();
CSHA256& Write(const unsigned char* data, size_t len);
Expand Down
2 changes: 2 additions & 0 deletions src/ipc/test/ipc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ static_assert(ipc::capnp::messages::DEFAULT_BLOCK_RESERVED_WEIGHT == DEFAULT_BLO
static_assert(ipc::capnp::messages::DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS == DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS);

//! Remote init class.
namespace {
class TestInit : public interfaces::Init
{
public:
std::atomic<bool> stop_called{false};
std::unique_ptr<interfaces::Echo> makeEcho() override { return interfaces::MakeEcho(); }
void stop() override { stop_called.store(true); }
};
} // namespace

//! Generate a temporary path with temp_directory_path and mkstemp
static std::string TempPath(std::string_view pattern)
Expand Down
4 changes: 2 additions & 2 deletions src/support/lockedpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,11 @@ class LockedPool
* allocation and deallocation overhead. Setting it too high allocates
* more locked memory from the OS than strictly necessary.
*/
static const size_t ARENA_SIZE = 256*1024;
static constexpr size_t ARENA_SIZE = 256*1024;
/** Chunk alignment. Another compromise. Setting this too high will waste
* memory, setting it too low will facilitate fragmentation.
*/
static const size_t ARENA_ALIGN = 16;
static constexpr size_t ARENA_ALIGN = 16;

/** Callback when allocation succeeds but locking fails.
*/
Expand Down
1 change: 1 addition & 0 deletions src/test/util/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ inline std::ostream& operator<<(std::ostream& os, const T& e)
}

template <typename T>
requires requires(std::ostream& os, const T& t) { os << t; }
inline std::ostream& operator<<(std::ostream& os, const std::optional<T>& v)
{
return v ? os << *v
Expand Down
Loading