diff --git a/nano/node/scheduler/bucket.cpp b/nano/node/scheduler/bucket.cpp index 4e4ecb0a50..de9083b34f 100644 --- a/nano/node/scheduler/bucket.cpp +++ b/nano/node/scheduler/bucket.cpp @@ -189,20 +189,6 @@ void nano::scheduler::bucket::dump () const } } -/* - * block_entry - */ - -bool nano::scheduler::bucket::block_entry::operator< (block_entry const & other_a) const -{ - return time < other_a.time || (time == other_a.time && block->hash () < other_a.block->hash ()); -} - -bool nano::scheduler::bucket::block_entry::operator== (block_entry const & other_a) const -{ - return time == other_a.time && block->hash () == other_a.block->hash (); -} - /* * priority_bucket_config */ diff --git a/nano/node/scheduler/bucket.hpp b/nano/node/scheduler/bucket.hpp index b5b12b2b87..be82aecf84 100644 --- a/nano/node/scheduler/bucket.hpp +++ b/nano/node/scheduler/bucket.hpp @@ -83,13 +83,20 @@ class bucket final uint64_t time; std::shared_ptr block; - bool operator< (block_entry const & other) const; - bool operator== (block_entry const & other) const; - nano::block_hash hash () const { return block->hash (); } + + // Keep operators inlined + bool operator< (block_entry const & other) const + { + return time < other.time || (time == other.time && hash () < other.hash ()); + } + bool operator== (block_entry const & other) const + { + return time == other.time && hash () == other.hash (); + } }; // clang-format off