diff options
| author | levlam <levlam@telegram.org> | 2018-01-21 16:50:35 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2018-01-21 16:50:35 +0300 |
| commit | 5c0633f17a4452575c9bc2f7b4208220bbebd279 (patch) | |
| tree | 9679b0668d2344337e3dcf98da1e8f47e8c9b495 /memprof | |
| parent | 86cb681064f29102d4073455ed09a68c76958b99 (diff) | |
Replace assert with if to prevent warning about unused variable.
GitOrigin-RevId: f9e72c623ace83f14b2268647a0880bcb49040a4
Diffstat (limited to 'memprof')
| -rw-r--r-- | memprof/memprof.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/memprof/memprof.cpp b/memprof/memprof.cpp index da75c5edf..11822ee00 100644 --- a/memprof/memprof.cpp +++ b/memprof/memprof.cpp @@ -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; } } |
