summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ripser.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/ripser.cpp b/ripser.cpp
index 51b3d9e..e166080 100644
--- a/ripser.cpp
+++ b/ripser.cpp
@@ -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