From 1d8e661ef1b2136f71f8d8a6b3edb547352e82be Mon Sep 17 00:00:00 2001 From: RickiNano <81099017+RickiNano@users.noreply.github.com> Date: Sun, 28 Jan 2024 20:15:57 +0100 Subject: [PATCH] Use const value instead of reference --- nano/node/unchecked_map.cpp | 2 +- nano/node/unchecked_map.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nano/node/unchecked_map.cpp b/nano/node/unchecked_map.cpp index 9c9ccd53f1..b20651d793 100644 --- a/nano/node/unchecked_map.cpp +++ b/nano/node/unchecked_map.cpp @@ -5,7 +5,7 @@ #include #include -nano::unchecked_map::unchecked_map (unsigned & max_unchecked_blocks, nano::stats & stats, bool const & disable_delete) : +nano::unchecked_map::unchecked_map (unsigned const max_unchecked_blocks, nano::stats & stats, bool const & disable_delete) : max_unchecked_blocks{ max_unchecked_blocks }, stats{ stats }, disable_delete{ disable_delete }, diff --git a/nano/node/unchecked_map.hpp b/nano/node/unchecked_map.hpp index c733ba20c8..9a548c203d 100644 --- a/nano/node/unchecked_map.hpp +++ b/nano/node/unchecked_map.hpp @@ -22,7 +22,7 @@ class stats; class unchecked_map { public: - unchecked_map (unsigned & max_unchecked_blocks, nano::stats &, bool const & do_delete); + unchecked_map (unsigned const max_unchecked_blocks, nano::stats &, bool const & do_delete); ~unchecked_map (); void put (nano::hash_or_account const & dependency, nano::unchecked_info const & info); @@ -62,7 +62,7 @@ class unchecked_map nano::condition_variable condition; nano::mutex mutex; std::thread thread; - unsigned max_unchecked_blocks; + unsigned const max_unchecked_blocks; void process_queries (decltype (buffer) const & back_buffer);