The related code in training/util.h now uses the GOOGLE_TESSERACT macro
to enable Google specific code to disable heap checking.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Remove old code for string class (no longer needed)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Add std namespace to string class
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Since commit cdc35338c5 Tesseract checks
the value passed for `--oem NUM`.
That only works as expected when the old (now unused) engine mode values
for cube are removed.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
ccstruct/seam.cpp:66:26: warning:
array subscript has type 'char' [-Wchar-subscripts]
Fix it by using an unsigned index and use the same type for related values.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes these compiler warnings:
ccmain/equationdetect.cpp:1519:2: warning: extra ‘;’ [-Wpedantic]
ccstruct/blobs.cpp:65:17: warning: extra ‘;’ [-Wpedantic]
ccstruct/blobs.h:178:18: warning: extra ‘;’ [-Wpedantic]
ccstruct/ratngs.cpp:36:22: warning: extra ‘;’ [-Wpedantic]
ccstruct/ratngs.cpp:37:22: warning: extra ‘;’ [-Wpedantic]
ccutil/ambigs.cpp:46:20: warning: extra ‘;’ [-Wpedantic]
ccutil/ambigs.h:137:21: warning: extra ‘;’ [-Wpedantic]
cutil/structures.cpp:36:45: warning: extra ‘;’ [-Wpedantic]
textord/equationdetectbase.cpp:65:2: warning: extra ‘;’ [-Wpedantic]
textord/equationdetectbase.h:57:2: warning: extra ‘;’ [-Wpedantic]
wordrec/lm_state.cpp:25:28: warning: extra ‘;’ [-Wpedantic]
wordrec/lm_state.h:190:29: warning: extra ‘;’ [-Wpedantic]
Signed-off-by: Stefan Weil <sw@weilnetz.de>
A single bit cannot represent a signed integer value, so it must be an
unsigned integer. This fixes a compiler warning:
In file included from ../ccutil/clst.h:24:0,
from ../ccstruct/blobbox.h:23,
from workingpartset.h:24,
from workingpartset.cpp:21:
../ccstruct/blobbox.h: In member function ‘void BLOBNBOX::set_reduced_box(TBOX)’:
../ccutil/host.h:79:25: warning: overflow in conversion from ‘int’ to ‘signed char:1’ changes value from ‘1’ to ‘-1’ [-Woverflow]
#define TRUE 1
^
../ccstruct/blobbox.h:236:17: note: in expansion of macro ‘TRUE’
reduced = TRUE;
^~~~
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The first parameter is casted to an unsigned byte by Leptonica,
so we don't need additional type casts in Tesseract code.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Both functions simply call malloc, free.
Remove also unneeded null pointer checks and use calloc where possible.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
The internal range is 0...(n-1), but for users a page range 1...n is
more natural. Showing a range 0...n is wrong because it would imply
n+1 pages.
Change printed text from
Loaded 72/72 pages (0-72) of document ...
to
Loaded 72/72 pages (1-72) of document ...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
clang++ report:
api/baseapi.h:852:4: warning:
extra ';' after member function definition [-Wextra-semi]
[...]
Signed-off-by: Stefan Weil <sw@weilnetz.de>