Stefan Weil
e76d81a0d5
Include src/training when exporting compile commands with cmake
...
`cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..` is used to get the file
compile_commands.json which is required by clang-tidy.
Export compile commands for all source files, not only those from
the default build, so clang-tidy can cover all source files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-02 06:34:45 +02:00
Stefan Weil
e262d71a56
Modifiy formatting rules
...
* Allow a single line for empty functions only.
* Don't allow if statements on a single line.
This improves readability and helps when debugging.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-02 06:34:45 +02:00
Egor Pugin
3e7144e796
Update appveyor.yml
2019-04-01 22:59:33 +03:00
Egor Pugin
af7cc1ce4c
Fix windows build.
2019-04-01 22:38:01 +03:00
Stefan Weil
81fbd878dd
Add more missing include statements for Windows build
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-04-01 08:10:25 +02:00
Stefan Weil
ab009fae94
Remove macro WINDLLNAME
...
It is now no longer used.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 20:05:41 +02:00
Stefan Weil
77a5f2623e
Remove unused config variable tessedit_module_name
...
It was only defined for Windows builds.
Use also false instead of 0 to set the default value of
two boolean config variables.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 20:04:00 +02:00
Stefan Weil
c150b9832d
Add missing include statements for Windows build
...
The last commits which removed BOOL8 had broken the Windows build.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 19:02:29 +02:00
Stefan Weil
802f42e821
Remove BOOL8, TRUE, FALSE from host.h
...
Remove unneeded include statements for host.h, add required ones and
update the comments for the remaining include statements.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 18:27:20 +02:00
Stefan Weil
be96b7b660
bits16: Format code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 18:26:50 +02:00
Stefan Weil
146079f31d
api: Replace BOOL8, TRUE, FALSE by bool, true, false and modernize code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 18:15:53 +02:00
Stefan Weil
4e0c726d6c
ccutil: replace TRUE, FALSE by true, false
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:56:47 +02:00
Stefan Weil
da0c14ae45
cutil: Replace TRUE, FALSE by true, false
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:56:19 +02:00
Stefan Weil
87a973652c
classify: Replace BOOL8, TRUE, FALSE by bool, true, false
...
Simplify also some related code.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:55:48 +02:00
Stefan Weil
30ee3afc29
textord: Replace TRUE, FALSE by true, false and use bool instead of BOOL8
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:55:20 +02:00
Stefan Weil
bb52887c36
unittest: Replace TRUE, FALSE by true, false
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:54:48 +02:00
Stefan Weil
b391ab84d0
wordrec: Replace TRUE, FALSE by true, false
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:54:21 +02:00
Stefan Weil
cbb5e729a1
classify: Use bool and replace TRUE, FALSE
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:53:50 +02:00
Stefan Weil
46fa59aadc
ccstruct: Replace BOOL8, TRUE, FALSE by bool, true, false and modernize code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:53:06 +02:00
Stefan Weil
92b9f9f8de
ccmain: Replace TRUE, FALSE by true, false
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:52:09 +02:00
zdenop
21547d42ef
Merge pull request #2362 from stweil/unused
...
Remove unused config variable tessedit_single_match
2019-03-31 17:47:01 +02:00
Stefan Weil
7db25e15c0
Remove unused config variable tessedit_single_match
...
Replace also TRUE, FALSE by true, false.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:38:35 +02:00
Stefan Weil
ca2947a2c0
blobclass: Remove unused macros
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:36:46 +02:00
Stefan Weil
f2bd98e656
PageIterator: Remove useless const
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:35:43 +02:00
Stefan Weil
813b7803e0
pgedit: Replace BOOL8 by bool
...
Replace also TRUE, FALSE by true, false and add some static attributes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:29:15 +02:00
Stefan Weil
664811a869
Replace BOOL8, TRUE, FALSE by bool, true, false
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:28:28 +02:00
Stefan Weil
51a2c2eae8
Format code with clang-format
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:24:02 +02:00
Stefan Weil
95ea778745
capi: Replace FALSE, TRUE and simplify and format code
...
Format code using clang-format and clang-tidy.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:19:04 +02:00
Stefan Weil
89ba48b106
strngs: Modernize and format code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:13:38 +02:00
Stefan Weil
127d0e31f0
serialis: Modernize and format code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:12:11 +02:00
Stefan Weil
8b663e7620
helpers: Modernize and format code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 17:06:19 +02:00
zdenop
3bb8f9cd49
Merge branch 'master' of https://github.com/tesseract-ocr/tesseract
2019-03-31 16:54:15 +02:00
zdenop
5f06402755
python: optimize imports, reformat code
2019-03-31 16:53:39 +02:00
zdenop
2e9fd69c9e
use 'import pathlib'; fix "TypeError: argument of type 'WindowsPath' is not iterable"
2019-03-31 16:53:33 +02:00
zdenop
a0527b41bd
fix LGTM reports for python
2019-03-31 16:53:25 +02:00
Stefan Weil
1948f0d520
ocrclass: Modernize and format code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 16:39:44 +02:00
Stefan Weil
85957e9673
WERD: Don't print space character after "FALSE" at end of line
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 16:32:42 +02:00
Stefan Weil
83d4433d3b
Modernize and format unichar.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 16:30:15 +02:00
Stefan Weil
ac0b191f6b
Modernize and format genericvector.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 16:21:32 +02:00
Stefan Weil
36ed08636b
Modernize and format tesscallback.h
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-31 16:16:00 +02:00
zdenop
f47c7c92dd
fix uninitialized variables in wordstrboxrenderer and lstmboxrenderer;
...
CID 1399132, 1399134, 1399135, 1399137, 1399140, 1399141, 1399142
2019-03-31 12:26:49 +02:00
Egor Pugin
497d1c543c
Update appveyor.yml
2019-03-30 04:17:32 +03:00
Egor Pugin
5767fe4ae8
Update appveyor.yml
2019-03-29 19:06:00 +03:00
Shreeshrii
ea36e94e58
fix Could not parse bool from flag ( #2359 )
2019-03-29 14:50:21 +01:00
zdenop
521707ebfb
Merge pull request #2350 from stweil/fuzzing
...
Add test code for fuzzing
2019-03-29 07:48:50 +01:00
Stefan Weil
852598eecf
Remove file tessedit.h
...
It only declared the unused global variable global_monitor
which is now removed, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-27 19:03:42 +01:00
Stefan Weil
6e59abcce2
Remove file cutil.h
...
It only contained three type definitions which fit better in other
include files.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-27 19:03:42 +01:00
Zdenko Podobný
3bbe4327c0
fix #2344 libpthread under-linking on FreeBSD
2019-03-27 15:37:14 +01:00
Stefan Weil
4ccbb9f830
configure: Check support of compile flags with -Werror
...
gcc fails if an unsupported compile flag is given, but clang and clang++
normally only emit a warning "argument unused during compilation".
The old test had accepted flags like -mavx for clang++ on non Intel hosts.
This resulted in build failures because Intel code was included.
Now the check runs with -Werror, and unsupported flags are detected as
an error. This fixes the build problem with clang++ on non Intel hosts.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-26 16:41:52 +01:00
Stefan Weil
b6bfb20f1d
Improve readability of conditional code
...
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2019-03-26 12:35:56 +01:00