mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-14 00:31:47 +08:00
Clean usage of assert.h
Remove unneeded include statements, remove conditional statements and replace the remaining assert.h by their standard C++ variant cassert. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
629a10b504
commit
112aeb9826
@ -18,9 +18,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "tessbox.h"
|
||||
|
@ -18,11 +18,8 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include "allheaders.h"
|
||||
#include "boxread.h"
|
||||
#include "chopper.h"
|
||||
|
@ -27,11 +27,10 @@
|
||||
#include <string.h>
|
||||
#include <cmath>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include "callcpp.h"
|
||||
#include "control.h"
|
||||
#include "docqual.h"
|
||||
|
@ -17,12 +17,11 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#ifdef __UNIX__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "helpers.h"
|
||||
#include "tessvars.h"
|
||||
|
@ -18,12 +18,9 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "tessvars.h"
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#endif
|
||||
#include "scanutils.h"
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include "genericvector.h"
|
||||
#include "reject.h"
|
||||
|
@ -18,9 +18,6 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "scanutils.h"
|
||||
#include "fileerr.h"
|
||||
#include "blread.h"
|
||||
|
@ -19,9 +19,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <string.h>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include "coutln.h"
|
||||
|
||||
|
@ -21,10 +21,9 @@
|
||||
** limitations under the License.
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <cassert>
|
||||
#include "blamer.h"
|
||||
#include "pageres.h"
|
||||
#include "blobs.h"
|
||||
|
@ -18,9 +18,6 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#define FASTEDGELENGTH 256
|
||||
#include "polyaprx.h"
|
||||
#include "params.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef RATNGS_H
|
||||
#define RATNGS_H
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
#include "clst.h"
|
||||
#include "elst.h"
|
||||
|
@ -41,9 +41,6 @@ OF THIS IMPLIED TEMPORAL ORDERING OF THE FLAGS!!!!
|
||||
#ifndef REJCTMAP_H
|
||||
#define REJCTMAP_H
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <memory>
|
||||
#include "bits16.h"
|
||||
#include "errcode.h"
|
||||
|
@ -36,10 +36,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
V a r i a b l e s
|
||||
----------------------------------------------------------------------*/
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "strngs.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <cassert>
|
||||
|
||||
#include "errcode.h"
|
||||
#include "genericvector.h"
|
||||
|
@ -55,13 +55,11 @@
|
||||
#include "werd.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cmath>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#define ADAPT_TEMPLATE_SUFFIX ".a"
|
||||
|
||||
|
@ -23,10 +23,7 @@
|
||||
#endif
|
||||
|
||||
#include "errcode.h"
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include "memry.h"
|
||||
#include "scrollview.h"
|
||||
|
@ -20,9 +20,6 @@
|
||||
#ifndef CALLCPP_H
|
||||
#define CALLCPP_H
|
||||
|
||||
#ifndef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "host.h"
|
||||
#include "params.h"
|
||||
#include "unichar.h"
|
||||
|
@ -22,9 +22,6 @@
|
||||
#include "danerror.h"
|
||||
#include "tprintf.h"
|
||||
#include "globaloc.h"
|
||||
#ifdef __UNIX__
|
||||
#include "assert.h"
|
||||
#endif
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "stderr.h"
|
||||
#include "blobbox.h"
|
||||
#include "statistc.h"
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "stderr.h"
|
||||
#include "blobbox.h"
|
||||
#include "ccstruct.h"
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include "memry.h"
|
||||
#include "makerow.h"
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <math.h>
|
||||
#include "memry.h"
|
||||
#include "pitsync1.h"
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "stderr.h"
|
||||
#include "blobbox.h"
|
||||
#include "statistc.h"
|
||||
|
@ -21,9 +21,6 @@
|
||||
#include "config_auto.h"
|
||||
#endif
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "stderr.h"
|
||||
#include "globaloc.h"
|
||||
#include "blread.h"
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "underlin.h"
|
||||
|
||||
#define PROJECTION_MARGIN 10 //arbitrary
|
||||
|
@ -17,9 +17,6 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include "stderr.h"
|
||||
#include "blobbox.h"
|
||||
#include "statistc.h"
|
||||
|
@ -14,7 +14,6 @@
|
||||
#include "commontraining.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <assert.h>
|
||||
#include <cmath>
|
||||
|
||||
#include "allheaders.h"
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "normstrngs.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
@ -19,11 +19,8 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#include <cstdio>
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
|
||||
#include "associate.h"
|
||||
#include "normalis.h"
|
||||
|
@ -31,7 +31,6 @@
|
||||
|
||||
#include "chopper.h"
|
||||
|
||||
#include "assert.h"
|
||||
#include "associate.h"
|
||||
#include "blobs.h"
|
||||
#include "callcpp.h"
|
||||
|
@ -31,10 +31,6 @@
|
||||
#include "outlines.h"
|
||||
#include "wordrec.h"
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
namespace tesseract {
|
||||
/*----------------------------------------------------------------------
|
||||
F u n c t i o n s
|
||||
|
@ -22,9 +22,6 @@
|
||||
** limitations under the License.
|
||||
*
|
||||
*********************************************************************************/
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
|
||||
#include "plotedges.h"
|
||||
#include "render.h"
|
||||
|
@ -25,9 +25,6 @@
|
||||
#include "render.h"
|
||||
#include "blobs.h"
|
||||
|
||||
#ifdef __UNIX__
|
||||
#include <assert.h>
|
||||
#endif
|
||||
#include <cmath>
|
||||
|
||||
#include "vecfuncs.h"
|
||||
|
Loading…
Reference in New Issue
Block a user