mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02:00
refactor: use c++20 std::views::reverse instead of reverse_iterator.h
Use std::ranges::views::reverse instead of the implementation in reverse_iterator.h, and remove it as it is no longer used.
This commit is contained in:
parent
949b673472
commit
2925bd537c
9 changed files with 22 additions and 66 deletions
|
|
@ -20,7 +20,6 @@
|
|||
#include <primitives/block.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <random.h>
|
||||
#include <reverse_iterator.h>
|
||||
#include <serialize.h>
|
||||
#include <signet.h>
|
||||
#include <span.h>
|
||||
|
|
@ -38,6 +37,7 @@
|
|||
#include <validation.h>
|
||||
|
||||
#include <map>
|
||||
#include <ranges>
|
||||
#include <unordered_map>
|
||||
|
||||
namespace kernel {
|
||||
|
|
@ -579,7 +579,7 @@ const CBlockIndex* BlockManager::GetLastCheckpoint(const CCheckpointData& data)
|
|||
{
|
||||
const MapCheckpoints& checkpoints = data.mapCheckpoints;
|
||||
|
||||
for (const MapCheckpoints::value_type& i : reverse_iterate(checkpoints)) {
|
||||
for (const MapCheckpoints::value_type& i : checkpoints | std::views::reverse) {
|
||||
const uint256& hash = i.second;
|
||||
const CBlockIndex* pindex = LookupBlockIndex(hash);
|
||||
if (pindex) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue