From 8eb5f86e9ab7f360380659d3e8b6ba11d957c994 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Mon, 12 Feb 2024 09:45:02 +0100 Subject: [PATCH] Fixed cppcheck error --- src/crypto.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crypto.cpp b/src/crypto.cpp index f36883f..21b39ea 100644 --- a/src/crypto.cpp +++ b/src/crypto.cpp @@ -219,8 +219,8 @@ public: { WriteLock lock(derivations_lock); - DerivationEntry& entry = derivations->emplace(index, DerivationEntry{ derivation, { 0xFFFFFFFFUL, 0xFFFFFFFFUL }, {}, t }).first->second; - entry.add_view_tag(static_cast(output_index << 8) | view_tag); + auto entry = derivations->emplace(index, DerivationEntry{ derivation, { 0xFFFFFFFFUL, 0xFFFFFFFFUL }, {}, t }).first; + entry->second.add_view_tag(static_cast(output_index << 8) | view_tag); } return true;