Skip to content

Commit

Permalink
Fix GCC warning about array-bounds in BlockChainCache.cpp when replac…
Browse files Browse the repository at this point in the history
…ing contents of std::vector
  • Loading branch information
mtl1979 committed Mar 10, 2024
1 parent 3e8a647 commit b42a285
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/CryptoNoteCore/BlockchainCache.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2012-2017, The CryptoNote developers, The Bytecoin developers
// Copyright (c) 2018-2019, The Bittorium developers
// Copyright (c) 2019, The Talleo developers
// Copyright (c) 2019-2024, The Talleo developers
//
// This file is part of Bytecoin.
//
Expand Down Expand Up @@ -270,8 +270,9 @@ std::unique_ptr<IBlockchainCache> BlockchainCache::split(uint32_t splitBlockInde
splitKeyOutputsGlobalIndexes(*newCache, splitBlockIndex);

fixChildrenParent(newCache.get());
newCache->children = children;
children = { newCache.get() };
newCache->children = std::move(children);
children.clear();
children.push_back(newCache.get());

logger(Logging::DEBUGGING) << "Split successfully completed";
return std::move(newCache);
Expand Down

0 comments on commit b42a285

Please sign in to comment.