Skip to content

Commit e468e75

Browse files
committed
Remove trailing whitespaces
1 parent 7f9d720 commit e468e75

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

llama-util.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ typedef llama_buffer llama_ctx_buffer;
545545

546546
struct llama_trie_node {
547547
llama_trie_node(): is_terminator(false) {}
548-
548+
549549
std::unordered_map<char, llama_trie_node*> children;
550550
bool is_terminator;
551551
};
@@ -560,7 +560,7 @@ struct llama_trie {
560560
if (word.empty()) {
561561
return;
562562
}
563-
563+
564564
llama_trie_node *ref = root_;
565565
for (char c : word) {
566566
if (ref->children.find(c) == ref->children.end()) {
@@ -630,7 +630,7 @@ struct llama_trie {
630630
end = lookahead_index;
631631
skip = lookahead_index;
632632
}
633-
633+
634634
auto looktrie_pointer_it = looktrie_pointer->children.find(next_char);
635635
while (looktrie_pointer_it != looktrie_pointer->children.end()) {
636636
looktrie_pointer = looktrie_pointer_it->second;
@@ -640,7 +640,7 @@ struct llama_trie {
640640
end = lookahead_index;
641641
skip = lookahead_index;
642642
}
643-
643+
644644
if (lookahead_index == text.size()) {
645645
// End of string
646646
break;
@@ -649,13 +649,13 @@ struct llama_trie {
649649
looktrie_pointer_it = looktrie_pointer->children.find(next_char);
650650
}
651651
}
652-
652+
653653
offsets.push_back(start);
654654
offsets.push_back(end);
655655
reset = true;
656656
break;
657-
}
658-
657+
}
658+
659659
auto trie_pointer_it = trie_pointer->children.find(current_char);
660660
if (trie_pointer_it != trie_pointer->children.end()) {
661661
// The current character being looked at has a match within the trie
@@ -669,20 +669,20 @@ struct llama_trie {
669669
state = states.erase(state);
670670
}
671671
}
672-
672+
673673
if (reset) {
674674
// Clear the full start (we found a real match)
675675
states.clear();
676676
}
677-
677+
678678
// If this character is a starting character within the trie
679679
// start keeping track of this partial match.
680680
auto children_it = root_->children.find(current_char);
681681
if (current >= skip && children_it != root_->children.end()) {
682682
states[current] = children_it->second;
683683
}
684684
}
685-
685+
686686
// We have a cut at the end with states.
687687
for (const auto & state : states) {
688688
int start = state.first;
@@ -696,7 +696,7 @@ struct llama_trie {
696696
break;
697697
}
698698
}
699-
699+
700700
offsets.push_back(text.size());
701701
return offsets;
702702
}

0 commit comments

Comments
 (0)