Skip to content

Commit d761e6d

Browse files
kevinconKirill Makankov
authored andcommitted
Manually fixed conversion warnings in upstream Tesseract headers.
1 parent 6ababc7 commit d761e6d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

TesseractOCR/include/tesseract/genericvector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ inline bool LoadDataFromFile(const STRING& filename,
335335
size_t size = ftell(fp);
336336
fseek(fp, 0, SEEK_SET);
337337
// Pad with a 0, just in case we treat the result as a string.
338-
data->init_to_size(size + 1, 0);
338+
data->init_to_size((int) size + 1, 0);
339339
bool result = fread(&(*data)[0], 1, size, fp) == size;
340340
fclose(fp);
341341
return result;

TesseractOCR/include/tesseract/helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
// Remove newline (if any) at the end of the string.
3232
inline void chomp_string(char *str) {
33-
int last_index = strlen(str) - 1;
33+
int last_index = (int) strlen(str) - 1;
3434
while (last_index >= 0 &&
3535
(str[last_index] == '\n' || str[last_index] == '\r')) {
3636
str[last_index--] = '\0';

0 commit comments

Comments
 (0)