From d9de5991ff3e7f0f44ef386b04f645ff0b8479ab Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Tue, 2 Feb 2016 11:30:27 +0300 Subject: [PATCH] [new downloader] Corrections after colleagues comments. --- storage/simple_tree.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/simple_tree.hpp b/storage/simple_tree.hpp index bb461e388b..d2ca16d729 100644 --- a/storage/simple_tree.hpp +++ b/storage/simple_tree.hpp @@ -112,7 +112,8 @@ public: SimpleTree const & Child(size_t index) const { - return m_children.at(index); + ASSERT_LESS(index, m_children.size(), ()); + return m_children[index]; } size_t ChildrenCount() const @@ -124,7 +125,7 @@ public: template void ForEachChild(TFunctor && f) { - for (auto const & child : m_children) + for (auto & child : m_children) f(child); } @@ -160,7 +161,7 @@ public: void ForEachInSubtree(TFunctor && f) { f(*this); - for (auto const & child: m_children) + for (auto & child: m_children) child.ForEachInSubtree(f); }