Skip to content

Commit

Permalink
Clang fixes to earlier changes and build compatability with Google en…
Browse files Browse the repository at this point in the history
…vironment
  • Loading branch information
theraysmith committed Jun 12, 2015
1 parent 3ba1f83 commit ab0f4e2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
5 changes: 2 additions & 3 deletions api/pdfrenderer.cpp
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down
6 changes: 2 additions & 4 deletions ccmain/paragraphs.cpp
Expand Up @@ -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();
}


Expand Down
5 changes: 0 additions & 5 deletions training/fileio.h
Expand Up @@ -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.
Expand Down

0 comments on commit ab0f4e2

Please sign in to comment.