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

updated lite-client

This commit is contained in:
ton 2020-03-31 17:11:56 +04:00
parent 4dd5eea11f
commit 4b5dd4525e
27 changed files with 204 additions and 29 deletions

View file

@ -375,4 +375,10 @@ const TLB* TypenameLookup::lookup(std::string str) const {
return it != types.end() ? it->second : nullptr;
}
const TLB* TypenameLookup::lookup(td::Slice str) const {
auto it = std::lower_bound(types.begin(), types.end(), str,
[](const auto& x, const auto& y) { return td::Slice(x.first) < y; });
return it != types.end() && td::Slice(it->first) == str ? it->second : nullptr;
}
} // namespace tlb