replace deprecated C++ headers (reported by clan-tidy) - partially supersedes PR #1605

This commit is contained in:
Zdenko Podobný 2018-09-18 18:51:11 +02:00
parent 62a5e8cfc3
commit 5d22fdfeed
31 changed files with 47 additions and 47 deletions

View File

@ -24,7 +24,7 @@
#include "baseapi.h" #include "baseapi.h"
#ifdef __linux__ #ifdef __linux__
#include <signal.h> // for sigaction, SA_RESETHAND, SIGBUS, SIGFPE #include <csignal> // for sigaction, SA_RESETHAND, SIGBUS, SIGFPE
#endif #endif
#if defined(_WIN32) #if defined(_WIN32)

View File

@ -23,9 +23,9 @@
#include <memory> // std::unique_ptr #include <memory> // std::unique_ptr
#include "allheaders.h" #include "allheaders.h"
#include "baseapi.h" #include "baseapi.h"
#include "math.h" #include <cmath>
#include "renderer.h" #include "renderer.h"
#include "strngs.h" #include <cstring>
#include "tprintf.h" #include "tprintf.h"
/* /*

View File

@ -18,7 +18,7 @@
* *
**********************************************************************/ **********************************************************************/
#include <ctype.h> #include <cctype>
#include <cstring> #include <cstring>
#include "tessvars.h" #include "tessvars.h"
#include "reject.h" #include "reject.h"

View File

@ -17,8 +17,8 @@
* *
**********************************************************************/ **********************************************************************/
#include <ctype.h> #include <cctype>
#include <errno.h> #include <cerrno>
#include <cstring> #include <cstring>
#include "allheaders.h" #include "allheaders.h"
#include "boxread.h" #include "boxread.h"

View File

@ -17,7 +17,7 @@
* *
**********************************************************************/ **********************************************************************/
#include <ctype.h> #include <cctype>
#include "docqual.h" #include "docqual.h"
#include "reject.h" #include "reject.h"
#include "tesscallback.h" #include "tesscallback.h"

View File

@ -22,7 +22,7 @@
#endif #endif
#include <algorithm> #include <algorithm>
#include <float.h> #include <cfloat>
#include <limits> #include <limits>
#include <memory> #include <memory>

View File

@ -19,7 +19,7 @@
#include <algorithm> #include <algorithm>
#include <cstring> #include <cstring>
#include <ctype.h> #include <cctype>
#include "params.h" #include "params.h"
#include "float2int.h" #include "float2int.h"
#include "tesseractclass.h" #include "tesseractclass.h"

View File

@ -17,8 +17,8 @@
* *
**********************************************************************/ **********************************************************************/
#include <ctype.h> #include <cctype>
#include <errno.h> #include <cerrno>
#include <cstring> #include <cstring>
#include "helpers.h" #include "helpers.h"
#include "tessvars.h" #include "tessvars.h"

View File

@ -18,11 +18,11 @@
**********************************************************************/ **********************************************************************/
#include "paragraphs.h" #include "paragraphs.h"
#include <ctype.h> // for isspace #include <cctype> // for isspace
#include <math.h> // for abs #include <cmath> // for abs
#include <stdio.h> // for snprintf #include <cstdio> // for snprintf
#include <stdlib.h> // for abs #include <cstdlib> // for abs
#include <string.h> // for strchr, strlen #include <cstring> // for strchr, strlen
#include <algorithm> // for max #include <algorithm> // for max
#include <memory> // for unique_ptr #include <memory> // for unique_ptr
#include "genericvector.h" // for GenericVector, GenericVectorEqEq #include "genericvector.h" // for GenericVector, GenericVectorEqEq

View File

@ -24,8 +24,8 @@
#include "pgedit.h" #include "pgedit.h"
#include <ctype.h> #include <cctype>
#include <math.h> #include <cmath>
#include "blread.h" #include "blread.h"
#include "control.h" #include "control.h"

View File

@ -38,8 +38,8 @@ int16_t Tesseract::safe_dict_word(const WERD_RES *werd_res) {
#else #else
#include "tessvars.h" #include "tessvars.h"
#include <ctype.h> #include <cctype>
#include <errno.h> #include <cerrno>
#include <cstring> #include <cstring>
#include "genericvector.h" #include "genericvector.h"
#include "reject.h" #include "reject.h"

View File

@ -19,8 +19,8 @@
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#include "blamer.h" #include "blamer.h"
#include <math.h> // for abs #include <cmath> // for abs
#include <stdlib.h> // for abs #include <cstdlib> // for abs
#include "blobs.h" // for TPOINT, TWERD, TBLOB #include "blobs.h" // for TPOINT, TWERD, TBLOB
#include "errcode.h" // for ASSERT_HOST #include "errcode.h" // for ASSERT_HOST
#include "matrix.h" // for MATRIX #include "matrix.h" // for MATRIX

View File

@ -17,8 +17,8 @@
* *
**********************************************************************/ **********************************************************************/
#include <stdio.h> #include <cstdio>
#include <math.h> #include <cmath>
#include "errcode.h" #include "errcode.h"
#include "linlsq.h" #include "linlsq.h"

View File

@ -22,7 +22,7 @@
#endif // _MSC_VER #endif // _MSC_VER
#include <algorithm> #include <algorithm>
#include <stdlib.h> #include <cstdlib>
#include "helpers.h" #include "helpers.h"
#include "serialis.h" #include "serialis.h"
#include "points.h" #include "points.h"

View File

@ -16,7 +16,7 @@
**********************************************************************/ **********************************************************************/
#include "polyblk.h" #include "polyblk.h"
#include <ctype.h> #include <cctype>
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>
#include <memory> // std::unique_ptr #include <memory> // std::unique_ptr

View File

@ -24,8 +24,8 @@
#include "statistc.h" #include "statistc.h"
#include <cstring> #include <cstring>
#include <math.h> #include <cmath>
#include <stdlib.h> #include <cstdlib>
#include "errcode.h" #include "errcode.h"
#include "helpers.h" #include "helpers.h"
#include "scrollview.h" #include "scrollview.h"

View File

@ -18,7 +18,7 @@
#include "basedir.h" #include "basedir.h"
#include <stdlib.h> #include <cstdlib>
// Assuming that code_path is the name of some file in a desired directory, // 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 // returns the given code_path stripped back to the last slash, leaving

View File

@ -17,9 +17,9 @@
* *
**********************************************************************/ **********************************************************************/
#include <stdio.h> #include <cstdio>
#include <stdlib.h> #include <cstdlib>
#include <stdarg.h> #include <cstdarg>
#include <cstring> #include <cstring>
#include "tprintf.h" #include "tprintf.h"
#include "errcode.h" #include "errcode.h"

View File

@ -18,7 +18,7 @@
**********************************************************************/ **********************************************************************/
#include "globaloc.h" #include "globaloc.h"
#include <signal.h> #include <csignal>
#ifdef __linux__ #ifdef __linux__
#include <sys/syscall.h> // For SYS_gettid. #include <sys/syscall.h> // For SYS_gettid.
#include <unistd.h> // For syscall itself. #include <unistd.h> // For syscall itself.

View File

@ -17,9 +17,9 @@
* *
**********************************************************************/ **********************************************************************/
#include <stdio.h> #include <cstdio>
#include <cstring> #include <cstring>
#include <stdlib.h> #include <cstdlib>
#include "genericvector.h" #include "genericvector.h"
#include "tprintf.h" #include "tprintf.h"

View File

@ -20,7 +20,7 @@
#ifndef PARAMS_H #ifndef PARAMS_H
#define PARAMS_H #define PARAMS_H
#include <stdio.h> #include <cstdio>
#include "genericvector.h" #include "genericvector.h"
#include "strngs.h" #include "strngs.h"

View File

@ -38,7 +38,7 @@
#endif #endif
#endif /* defined(_MSC_VER) */ #endif /* defined(_MSC_VER) */
#else #else
#include <limits.h> #include <climits>
#ifndef PATH_MAX #ifndef PATH_MAX
#define MAX_PATH 4096 #define MAX_PATH 4096
#else #else

View File

@ -33,7 +33,7 @@
#include "params.h" #include "params.h"
#include <algorithm> #include <algorithm>
#include <ctype.h> #include <cctype>
#include "dict.h" #include "dict.h"
/*---------------------------------------------------------------------- /*----------------------------------------------------------------------

View File

@ -13,7 +13,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#endif #endif
#include <float.h> #include <cfloat>
#include "oclkernels.h" #include "oclkernels.h"
#include "openclwrapper.h" #include "openclwrapper.h"
@ -2414,7 +2414,7 @@ static double getLineMasksMorphMicroBench(GPUEnv* env,
* Device Selection * Device Selection
*****************************************************************************/ *****************************************************************************/
#include "stdlib.h" #include <cstdlib>
// encode score object as byte string // encode score object as byte string
static ds_status serializeScore(ds_device* device, void** serializedScore, static ds_status serializeScore(ds_device* device, void** serializedScore,

View File

@ -63,7 +63,7 @@
#endif #endif
#if ON_LINUX #if ON_LINUX
#include <time.h> #include <ctime>
#endif #endif
/************************************************************************************ /************************************************************************************

View File

@ -28,7 +28,7 @@
---------------------------------------------------------------------- ----------------------------------------------------------------------
*/ */
#include <ctype.h> #include <cctype>
#include <cmath> #include <cmath>
#include "errcode.h" #include "errcode.h"
#include "drawtord.h" #include "drawtord.h"

View File

@ -17,7 +17,7 @@
* *
**********************************************************************/ **********************************************************************/
#include <math.h> #include <cmath>
#include <cfloat> // for FLT_MAX #include <cfloat> // for FLT_MAX
#include <vector> // for std::vector #include <vector> // for std::vector
#include "makerow.h" #include "makerow.h"

View File

@ -20,7 +20,7 @@
#ifndef TORDMAIN_H #ifndef TORDMAIN_H
#define TORDMAIN_H #define TORDMAIN_H
#include <time.h> #include <ctime>
#include "params.h" #include "params.h"
#include "ocrblock.h" #include "ocrblock.h"
#include "blobs.h" #include "blobs.h"

View File

@ -36,7 +36,7 @@ struct addrinfo {
#include <netinet/in.h> #include <netinet/in.h>
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include <signal.h> #include <csignal>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>
#include <sys/select.h> #include <sys/select.h>

View File

@ -19,7 +19,7 @@
#include "params_model.h" #include "params_model.h"
#include <ctype.h> #include <cctype>
#include <cmath> #include <cmath>
#include <cstdio> #include <cstdio>

View File

@ -17,7 +17,7 @@
// //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#include <stdint.h> // for INT32_MAX #include <cstdint> // for INT32_MAX
#include "blamer.h" // for BlamerBundle #include "blamer.h" // for BlamerBundle
#include "errcode.h" // for ASSERT_HOST #include "errcode.h" // for ASSERT_HOST
#include "genericvector.h" // for GenericVector #include "genericvector.h" // for GenericVector