Replace assert with if to prevent warning about unused variable.

GitOrigin-RevId: f9e72c623ace83f14b2268647a0880bcb49040a4
This commit is contained in:
levlam 2018-01-21 16:50:35 +03:00
parent 86cb681064
commit 5c0633f17a
1 changed files with 4 additions and 1 deletions

View File

@ -175,7 +175,10 @@ std::int32_t get_ht_pos(const Backtrace &bt, bool force = false) {
pos++;
if (pos == static_cast<std::int32_t>(ht.size())) {
pos = 0;
assert(!was_overflow);
if (was_overflow) {
// unreachable
std::abort();
}
was_overflow = true;
}
}