summaryrefslogtreecommitdiff
path: root/src/search.cpp
diff options
context:
space:
mode:
authorAldrik Ramaekers <aldrikboy@gmail.com>2024-03-09 15:41:43 +0100
committerAldrik Ramaekers <aldrikboy@gmail.com>2024-03-09 15:41:43 +0100
commit703c9ff2ea607d457b1d8c6ff4022b6869d40bf7 (patch)
treea847fa3a0ea023eb97ac46131fd6ba4c1a291c13 /src/search.cpp
parent331882200dbad630d7722b4f05e23d69edbc6a6a (diff)
fix warnings
Diffstat (limited to 'src/search.cpp')
-rw-r--r--src/search.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/search.cpp b/src/search.cpp
index 96f8c32..61f8d54 100644
--- a/src/search.cpp
+++ b/src/search.cpp
@@ -264,13 +264,13 @@ static void _ts_search_file(ts_found_file *ref, ts_file_content content, ts_sear
memset(file_match.line_info, 0, MAX_INPUT_LENGTH);
// Trim some text infront of match.
- int text_pad_lr = 35;
+ size_t text_pad_lr = 35;
if (file_match.word_match_offset > text_pad_lr)
{
size_t bytes_to_trim = (file_match.word_match_offset - text_pad_lr);
size_t bytes_trimmed = 0;
utf8_int8_t* line_start_before_trim = m->line_start;
- for (int i = 0; i < bytes_to_trim; i++) {
+ for (size_t i = 0; i < bytes_to_trim; i++) {
utf8_int32_t ch;
m->line_start = utf8codepoint(m->line_start, &ch);
bytes_trimmed = (m->line_start - line_start_before_trim);