Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde into c++20

This commit is contained in:
Jack Andersen 2020-04-10 19:07:55 -10:00
commit 330103d936
1 changed files with 10 additions and 6 deletions

View File

@ -27,14 +27,18 @@ CTransitionDatabaseGame::CTransitionDatabaseGame(const std::vector<CTransition>&
}
const std::shared_ptr<IMetaTrans>& CTransitionDatabaseGame::GetMetaTrans(u32 a, u32 b) const {
auto it = rstl::binary_find(x14_transitions.cbegin(), x14_transitions.cend(), std::make_pair(a, b),
[](const std::pair<std::pair<u32, u32>, std::shared_ptr<IMetaTrans>>& p) { return p.first; });
if (it != x14_transitions.cend())
const auto it = rstl::binary_find(x14_transitions.cbegin(), x14_transitions.cend(), std::make_pair(a, b),
[](const auto& p) { return p.first; });
if (it != x14_transitions.cend()) {
return it->second;
auto it2 = rstl::binary_find(x24_halfTransitions.cbegin(), x24_halfTransitions.cend(), b,
[](const std::pair<u32, std::shared_ptr<IMetaTrans>>& p) { return p.first; });
if (it2 != x24_halfTransitions.cend())
}
const auto it2 = rstl::binary_find(x24_halfTransitions.cbegin(), x24_halfTransitions.cend(), b,
[](const auto& p) { return p.first; });
if (it2 != x24_halfTransitions.cend()) {
return it2->second;
}
return x10_defaultTrans;
}