diff options
-rw-r--r-- | ripser.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -531,10 +531,8 @@ public: while (!column.empty()) { pivot = column.top(); column.pop(); - if (!column.empty()) { - if (get_index(column.top()) != get_index(pivot)) return pivot; - column.pop(); - } + if (column.empty() || get_index(column.top()) != get_index(pivot)) return pivot; + column.pop(); } pivot = -1; #endif |