summaryrefslogtreecommitdiff
path: root/decoder/tree_fragment.h
diff options
context:
space:
mode:
Diffstat (limited to 'decoder/tree_fragment.h')
-rw-r--r--decoder/tree_fragment.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/decoder/tree_fragment.h b/decoder/tree_fragment.h
index b1dbbae0..a38dbdfa 100644
--- a/decoder/tree_fragment.h
+++ b/decoder/tree_fragment.h
@@ -91,14 +91,10 @@ class BreadthFirstIterator : public std::iterator<std::forward_iterator_tag, uns
void Stage() {
if (q_.empty()) return;
const TFIState& s = q_.front();
- if (s.rhspos < 0) {
- sym = tf_->nodes[s.node].lhs;
- } else {
- sym = tf_->nodes[s.node].rhs[s.rhspos];
- if (IsInternalNT(sym)) {
- q_.push(TFIState(sym & ALL_MASK, 0));
- sym = tf_->nodes[sym & ALL_MASK].lhs;
- }
+ sym = tf_->nodes[s.node].rhs[s.rhspos];
+ if (IsInternalNT(sym)) {
+ q_.push(TFIState(sym & ALL_MASK, 0));
+ sym = tf_->nodes[sym & ALL_MASK].lhs;
}
}
const BreadthFirstIterator& operator++() {