diff --git a/search/result.hpp b/search/result.hpp index d4ed29ed58..3c61b4d2b6 100644 --- a/search/result.hpp +++ b/search/result.hpp @@ -152,7 +152,8 @@ public: /// Used in viewport search only. void AddResultNoChecks(Result && res) { - res.SetPositionInResults(m_vec.size()); + ASSERT_LESS(m_vec.size(), numeric_limits::max(), ()); + res.SetPositionInResults(static_cast(m_vec.size())); m_vec.push_back(move(res)); }