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

View File

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