We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed84bb7 commit 86208edCopy full SHA for 86208ed
peglib.h
@@ -1003,6 +1003,9 @@ class PrioritizedChoice : public Ope {
1003
size_t len = static_cast<size_t>(-1);
1004
1005
if (!for_label_) { c.cut_stack.push_back(false); }
1006
+ auto se = scope_exit([&]() {
1007
+ if (!for_label_) { c.cut_stack.pop_back(); }
1008
+ });
1009
1010
size_t id = 0;
1011
for (const auto &ope : opes_) {
@@ -1030,8 +1033,6 @@ class PrioritizedChoice : public Ope {
1030
1033
id++;
1031
1034
}
1032
1035
- if (!for_label_) { c.cut_stack.pop_back(); }
-
1036
return len;
1037
1038
0 commit comments