Skip to content

Commit 868b442

Browse files
ochafikggerganov
andauthored
Update common/regex-partial.cpp
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 908e12f commit 868b442

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

common/regex-partial.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ common_regex_match common_regex::search(const std::string & input, size_t pos, b
3535
if ((!as_match) || it == input.begin()) {
3636
common_regex_match res;
3737
res.type = COMMON_REGEX_MATCH_TYPE_PARTIAL;
38-
auto begin = std::distance(input.begin(), it);
38+
const size_t begin = std::distance(input.begin(), it);
3939
GGML_ASSERT(begin >= 0);
40-
auto end = input.size();//begin + group.length();
41-
GGML_ASSERT(static_cast<size_t>(begin) <= end);
42-
res.groups.push_back({static_cast<size_t>(begin), end});
40+
const size_t end = input.size();//begin + group.length();
41+
GGML_ASSERT(begin <= end);
42+
res.groups.push_back(begin, end});
4343
return res;
4444
}
4545
}

0 commit comments

Comments
 (0)