mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-06 01:04:57 +08:00
replace deprecated C++ headers (reported by clan-tidy) - partially supersedes PR #1605
This commit is contained in:
parent
62a5e8cfc3
commit
5d22fdfeed
@ -24,7 +24,7 @@
|
||||
|
||||
#include "baseapi.h"
|
||||
#ifdef __linux__
|
||||
#include <signal.h> // for sigaction, SA_RESETHAND, SIGBUS, SIGFPE
|
||||
#include <csignal> // for sigaction, SA_RESETHAND, SIGBUS, SIGFPE
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
@ -23,9 +23,9 @@
|
||||
#include <memory> // std::unique_ptr
|
||||
#include "allheaders.h"
|
||||
#include "baseapi.h"
|
||||
#include "math.h"
|
||||
#include <cmath>
|
||||
#include "renderer.h"
|
||||
#include "strngs.h"
|
||||
#include <cstring>
|
||||
#include "tprintf.h"
|
||||
|
||||
/*
|
||||
|
@ -18,7 +18,7 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include <cstring>
|
||||
#include "tessvars.h"
|
||||
#include "reject.h"
|
||||
|
@ -17,8 +17,8 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include "allheaders.h"
|
||||
#include "boxread.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include "docqual.h"
|
||||
#include "reject.h"
|
||||
#include "tesscallback.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
#include <float.h>
|
||||
#include <cfloat>
|
||||
#include <limits>
|
||||
#include <memory>
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include "params.h"
|
||||
#include "float2int.h"
|
||||
#include "tesseractclass.h"
|
||||
|
@ -17,8 +17,8 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include "helpers.h"
|
||||
#include "tessvars.h"
|
||||
|
@ -18,11 +18,11 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "paragraphs.h"
|
||||
#include <ctype.h> // for isspace
|
||||
#include <math.h> // for abs
|
||||
#include <stdio.h> // for snprintf
|
||||
#include <stdlib.h> // for abs
|
||||
#include <string.h> // for strchr, strlen
|
||||
#include <cctype> // for isspace
|
||||
#include <cmath> // for abs
|
||||
#include <cstdio> // for snprintf
|
||||
#include <cstdlib> // for abs
|
||||
#include <cstring> // for strchr, strlen
|
||||
#include <algorithm> // for max
|
||||
#include <memory> // for unique_ptr
|
||||
#include "genericvector.h" // for GenericVector, GenericVectorEqEq
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
#include "pgedit.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
|
||||
#include "blread.h"
|
||||
#include "control.h"
|
||||
|
@ -38,8 +38,8 @@ int16_t Tesseract::safe_dict_word(const WERD_RES *werd_res) {
|
||||
#else
|
||||
|
||||
#include "tessvars.h"
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <cctype>
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include "genericvector.h"
|
||||
#include "reject.h"
|
||||
|
@ -19,8 +19,8 @@
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "blamer.h"
|
||||
#include <math.h> // for abs
|
||||
#include <stdlib.h> // for abs
|
||||
#include <cmath> // for abs
|
||||
#include <cstdlib> // for abs
|
||||
#include "blobs.h" // for TPOINT, TWERD, TBLOB
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "matrix.h" // for MATRIX
|
||||
|
@ -17,8 +17,8 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <cstdio>
|
||||
#include <cmath>
|
||||
#include "errcode.h"
|
||||
#include "linlsq.h"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif // _MSC_VER
|
||||
|
||||
#include <algorithm>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
#include "helpers.h"
|
||||
#include "serialis.h"
|
||||
#include "points.h"
|
||||
|
@ -16,7 +16,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "polyblk.h"
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
#include <memory> // std::unique_ptr
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
#include "statistc.h"
|
||||
#include <cstring>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include "errcode.h"
|
||||
#include "helpers.h"
|
||||
#include "scrollview.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "basedir.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
// Assuming that code_path is the name of some file in a desired directory,
|
||||
// returns the given code_path stripped back to the last slash, leaving
|
||||
|
@ -17,9 +17,9 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstdarg>
|
||||
#include <cstring>
|
||||
#include "tprintf.h"
|
||||
#include "errcode.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
**********************************************************************/
|
||||
|
||||
#include "globaloc.h"
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#ifdef __linux__
|
||||
#include <sys/syscall.h> // For SYS_gettid.
|
||||
#include <unistd.h> // For syscall itself.
|
||||
|
@ -17,9 +17,9 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "genericvector.h"
|
||||
#include "tprintf.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef PARAMS_H
|
||||
#define PARAMS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include "genericvector.h"
|
||||
#include "strngs.h"
|
||||
|
@ -38,7 +38,7 @@
|
||||
#endif
|
||||
#endif /* defined(_MSC_VER) */
|
||||
#else
|
||||
#include <limits.h>
|
||||
#include <climits>
|
||||
#ifndef PATH_MAX
|
||||
#define MAX_PATH 4096
|
||||
#else
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "params.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include "dict.h"
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <float.h>
|
||||
#include <cfloat>
|
||||
|
||||
#include "oclkernels.h"
|
||||
#include "openclwrapper.h"
|
||||
@ -2414,7 +2414,7 @@ static double getLineMasksMorphMicroBench(GPUEnv* env,
|
||||
* Device Selection
|
||||
*****************************************************************************/
|
||||
|
||||
#include "stdlib.h"
|
||||
#include <cstdlib>
|
||||
|
||||
// encode score object as byte string
|
||||
static ds_status serializeScore(ds_device* device, void** serializedScore,
|
||||
|
@ -63,7 +63,7 @@
|
||||
#endif
|
||||
|
||||
#if ON_LINUX
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
|
@ -28,7 +28,7 @@
|
||||
----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include "errcode.h"
|
||||
#include "drawtord.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <cfloat> // for FLT_MAX
|
||||
#include <vector> // for std::vector
|
||||
#include "makerow.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef TORDMAIN_H
|
||||
#define TORDMAIN_H
|
||||
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
#include "params.h"
|
||||
#include "ocrblock.h"
|
||||
#include "blobs.h"
|
||||
|
@ -36,7 +36,7 @@ struct addrinfo {
|
||||
#include <netinet/in.h>
|
||||
#include <pthread.h>
|
||||
#include <semaphore.h>
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <sys/select.h>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "params_model.h"
|
||||
|
||||
#include <ctype.h>
|
||||
#include <cctype>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdint.h> // for INT32_MAX
|
||||
#include <cstdint> // for INT32_MAX
|
||||
#include "blamer.h" // for BlamerBundle
|
||||
#include "errcode.h" // for ASSERT_HOST
|
||||
#include "genericvector.h" // for GenericVector
|
||||
|
Loading…
Reference in New Issue
Block a user