Skip to content

Commit 5f2ada6

Browse files
committed
fix build failure
1 parent fc4dac7 commit 5f2ada6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

source/include/utils.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,8 @@ namespace util
195195
template <typename T, typename U>
196196
std::vector<std::pair<T, U>> zip(const std::vector<T>& a, const std::vector<U>& b)
197197
{
198-
assert(a.size() == b.size());
199-
200198
std::vector<std::pair<T, U>> ret;
201-
for(size_t i = 0; i < a.size(); i++)
199+
for(size_t i = 0; i < std::min(a.size(), b.size()); i++)
202200
ret.push_back({ a[i], b[i] });
203201

204202
return ret;

0 commit comments

Comments
 (0)