Skip to content

Commit 0524a08

Browse files
committed
use correct coding style
1 parent de053c6 commit 0524a08

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

examples/server/server.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,25 +2197,21 @@ struct server_context {
21972197
const std::string str_test = slot.generated_text.substr(pos);
21982198
bool send_text = true;
21992199

2200-
if(slot.n_sent_text == 0 && slot.has_next_token && !slot.params.start_strings.empty())
2201-
{
2200+
if(slot.n_sent_text == 0 && slot.has_next_token && !slot.params.start_strings.empty()) {
22022201
size_t max_start_string_size = 0;
2203-
for(auto start_string: slot.params.start_strings)
2204-
{
2202+
for(auto start_string: slot.params.start_strings) {
22052203
max_start_string_size = std::max(max_start_string_size, start_string.size());
22062204
}
22072205
size_t search_len = max_start_string_size + token_str.size();
22082206
size_t search_pos = 0;
2209-
if(slot.generated_text.size() > search_len)
2210-
{
2207+
if(slot.generated_text.size() > search_len) {
22112208
search_pos = slot.generated_text.size() - search_len;
22122209
}
22132210

22142211
auto found_pos = slot.generated_text.npos;
22152212
bool found = false;
22162213
std::string found_string;
2217-
for(auto start_string: slot.params.start_strings)
2218-
{
2214+
for(auto start_string: slot.params.start_strings) {
22192215
found_pos = slot.generated_text.find(start_string,search_pos);
22202216
if(found_pos != slot.generated_text.npos) {
22212217
found = true;

0 commit comments

Comments
 (0)