1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

pow-testgiver support

This commit is contained in:
ton 2020-07-06 17:07:20 +03:00
parent dbde9c1c40
commit f064b1047a
257 changed files with 6665 additions and 2608 deletions

View file

@ -19,8 +19,8 @@
#pragma once
#include "td/utils/common.h"
#include "td/utils/misc.h"
#include <limits>
#include <map>
#include <tuple>
@ -32,7 +32,8 @@ class Enumerator {
using Key = int32;
Key add(ValueT v) {
int32 next_id = narrow_cast<int32>(arr_.size() + 1);
CHECK(arr_.size() < static_cast<size_t>(std::numeric_limits<int32>::max() - 1));
int32 next_id = static_cast<int32>(arr_.size() + 1);
bool was_inserted;
decltype(map_.begin()) it;
std::tie(it, was_inserted) = map_.emplace(std::move(v), next_id);