Skip to content

Commit ab0f4e2

Browse files
committed
Clang fixes to earlier changes and build compatability with Google environment
1 parent 3ba1f83 commit ab0f4e2

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

api/pdfrenderer.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ bool TessPDFRenderer::BeginDocumentHandler() {
615615
if (n >= sizeof(buf)) return false;
616616
FILE *fp = fopen(buf, "rb");
617617
if (!fp) {
618-
fprintf(stderr, "Can not open file \"%s\"!\n", buf);
618+
tprintf("Can not open file \"%s\"!\n", buf);
619619
return false;
620620
}
621621
fseek(fp, 0, SEEK_END);
@@ -636,8 +636,7 @@ bool TessPDFRenderer::BeginDocumentHandler() {
636636
" /Length1 %ld\n"
637637
">>\n"
638638
"stream\n", size, size);
639-
if (n >= sizeof(buf))
640-
{
639+
if (n >= sizeof(buf)) {
641640
delete[] buffer;
642641
return false;
643642
}

ccmain/paragraphs.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -2401,10 +2401,8 @@ void InitializeTextAndBoxesPreRecognition(const MutableIterator &it,
24012401
word_res = page_res_it.forward();
24022402
} while (page_res_it.row() == this_row);
24032403

2404-
if(lword)
2405-
info->lword_box = lword->word->bounding_box();
2406-
if(rword)
2407-
info->rword_box = rword->word->bounding_box();
2404+
if (lword) info->lword_box = lword->word->bounding_box();
2405+
if (rword) info->rword_box = rword->word->bounding_box();
24082406
}
24092407

24102408

training/fileio.h

-5
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ class InputBuffer {
6363

6464
~InputBuffer();
6565

66-
// Read data until end-of-file or a \n is read.
67-
// The data is stored in '*out', excluding the \n if present.
68-
// Return false if an error occurs or at end-of-file, true otherwise.
69-
bool ReadLine(string* out);
70-
7166
// Read data until end-of-file.
7267
// The data is stored in '*out'.
7368
// Return false if an error occurs, true otherwise.

0 commit comments

Comments
 (0)