mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-07 09:52:40 +08:00
Clang fixes to earlier changes and build compatability with Google environment
This commit is contained in:
parent
3ba1f83eb1
commit
ab0f4e2c38
@ -615,7 +615,7 @@ bool TessPDFRenderer::BeginDocumentHandler() {
|
||||
if (n >= sizeof(buf)) return false;
|
||||
FILE *fp = fopen(buf, "rb");
|
||||
if (!fp) {
|
||||
fprintf(stderr, "Can not open file \"%s\"!\n", buf);
|
||||
tprintf("Can not open file \"%s\"!\n", buf);
|
||||
return false;
|
||||
}
|
||||
fseek(fp, 0, SEEK_END);
|
||||
@ -636,8 +636,7 @@ bool TessPDFRenderer::BeginDocumentHandler() {
|
||||
" /Length1 %ld\n"
|
||||
">>\n"
|
||||
"stream\n", size, size);
|
||||
if (n >= sizeof(buf))
|
||||
{
|
||||
if (n >= sizeof(buf)) {
|
||||
delete[] buffer;
|
||||
return false;
|
||||
}
|
||||
|
@ -2401,10 +2401,8 @@ void InitializeTextAndBoxesPreRecognition(const MutableIterator &it,
|
||||
word_res = page_res_it.forward();
|
||||
} while (page_res_it.row() == this_row);
|
||||
|
||||
if(lword)
|
||||
info->lword_box = lword->word->bounding_box();
|
||||
if(rword)
|
||||
info->rword_box = rword->word->bounding_box();
|
||||
if (lword) info->lword_box = lword->word->bounding_box();
|
||||
if (rword) info->rword_box = rword->word->bounding_box();
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,11 +63,6 @@ class InputBuffer {
|
||||
|
||||
~InputBuffer();
|
||||
|
||||
// Read data until end-of-file or a \n is read.
|
||||
// The data is stored in '*out', excluding the \n if present.
|
||||
// Return false if an error occurs or at end-of-file, true otherwise.
|
||||
bool ReadLine(string* out);
|
||||
|
||||
// Read data until end-of-file.
|
||||
// The data is stored in '*out'.
|
||||
// Return false if an error occurs, true otherwise.
|
||||
|
Loading…
Reference in New Issue
Block a user