Replace string.h by standard C++ cstring

Remove the unneeded include statement in platform.h.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2018-06-21 20:32:51 +02:00
parent 57918c1072
commit 1371980f9f
24 changed files with 39 additions and 41 deletions

View File

@ -36,7 +36,7 @@
#else #else
#include <dirent.h> #include <dirent.h>
#include <libgen.h> #include <libgen.h>
#include <string.h> #include <cstring>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>

View File

@ -19,7 +19,7 @@
#include "config_auto.h" #include "config_auto.h"
#endif #endif
#include <string.h> #include <cstring>
#include <memory> // std::unique_ptr #include <memory> // std::unique_ptr
#include "baseapi.h" #include "baseapi.h"
#include "genericvector.h" #include "genericvector.h"

View File

@ -19,7 +19,7 @@
**********************************************************************/ **********************************************************************/
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <cstring>
#include "tessbox.h" #include "tessbox.h"
#include "tessvars.h" #include "tessvars.h"
#include "memry.h" #include "memry.h"

View File

@ -19,7 +19,7 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <cstring>
#include "allheaders.h" #include "allheaders.h"
#include "boxread.h" #include "boxread.h"
#include "chopper.h" #include "chopper.h"

View File

@ -24,7 +24,7 @@
#endif #endif
#include <algorithm> #include <algorithm>
#include <string.h> #include <cstring>
#include <cmath> #include <cmath>
#ifdef __UNIX__ #ifdef __UNIX__
#include <unistd.h> #include <unistd.h>

View File

@ -18,7 +18,7 @@
**********************************************************************/ **********************************************************************/
#include <algorithm> #include <algorithm>
#include <string.h> #include <cstring>
#include <ctype.h> #include <ctype.h>
#include "params.h" #include "params.h"
#include "float2int.h" #include "float2int.h"

View File

@ -19,7 +19,7 @@
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <cstring>
#ifdef __UNIX__ #ifdef __UNIX__
#include <unistd.h> #include <unistd.h>
#endif #endif

View File

@ -21,7 +21,7 @@
#include "scanutils.h" #include "scanutils.h"
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <cstring>
#include "genericvector.h" #include "genericvector.h"
#include "reject.h" #include "reject.h"
#include "control.h" #include "control.h"

View File

@ -21,7 +21,7 @@
#include "thresholder.h" #include "thresholder.h"
#include <string.h> #include <cstring>
#include "otsuthr.h" #include "otsuthr.h"

View File

@ -18,7 +18,7 @@
**********************************************************************/ **********************************************************************/
#include "boxread.h" #include "boxread.h"
#include <string.h> #include <cstring>
#include "fileerr.h" #include "fileerr.h"
#include "rect.h" #include "rect.h"

View File

@ -18,7 +18,7 @@
**********************************************************************/ **********************************************************************/
#include <algorithm> #include <algorithm>
#include <string.h> #include <cstring>
#include "coutln.h" #include "coutln.h"

View File

@ -19,7 +19,7 @@
#include "otsuthr.h" #include "otsuthr.h"
#include <string.h> #include <cstring>
#include "allheaders.h" #include "allheaders.h"
#include "helpers.h" #include "helpers.h"
#include "openclwrapper.h" #include "openclwrapper.h"

View File

@ -17,7 +17,7 @@
// //
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#include <string.h> #include <cstring>
#include "params_training_featdef.h" #include "params_training_featdef.h"

View File

@ -23,7 +23,7 @@
#endif #endif
#include "statistc.h" #include "statistc.h"
#include <string.h> #include <cstring>
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include "errcode.h" #include "errcode.h"

View File

@ -20,7 +20,7 @@
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
#include "bitvector.h" #include "bitvector.h"
#include <string.h> #include <cstring>
#include "helpers.h" #include "helpers.h"
#include <algorithm> #include <algorithm>

View File

@ -20,7 +20,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
#include <string.h> #include <cstring>
#ifdef __UNIX__ #ifdef __UNIX__
#include <signal.h> #include <signal.h>
#endif #endif

View File

@ -18,7 +18,7 @@
**********************************************************************/ **********************************************************************/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <cstring>
#include <stdlib.h> #include <stdlib.h>
#include "genericvector.h" #include "genericvector.h"

View File

@ -20,8 +20,6 @@
#ifndef TESSERACT_CCUTIL_PLATFORM_H_ #ifndef TESSERACT_CCUTIL_PLATFORM_H_
#define TESSERACT_CCUTIL_PLATFORM_H_ #define TESSERACT_CCUTIL_PLATFORM_H_
#include <string.h>
#define DLLSYM #define DLLSYM
#ifdef _WIN32 #ifdef _WIN32
#ifndef NOMINMAX #ifndef NOMINMAX

View File

@ -21,7 +21,7 @@
#define TESSERACT_CCUTIL_UNICHAR_H_ #define TESSERACT_CCUTIL_UNICHAR_H_
#include <memory.h> #include <memory.h>
#include <string.h> #include <cstring>
#include <string> #include <string>
#include <vector> #include <vector>
#include "platform.h" #include "platform.h"

View File

@ -29,7 +29,7 @@
#include "shapeclassifier.h" #include "shapeclassifier.h"
#include "shapetable.h" #include "shapetable.h"
#include "unicity_table.h" #include "unicity_table.h"
#include <string.h> #include <cstring>
namespace tesseract { namespace tesseract {
Classify::Classify() Classify::Classify()

View File

@ -31,7 +31,7 @@
#include "ocrfeatures.h" #include "ocrfeatures.h"
#include "clusttool.h" #include "clusttool.h"
#include "cluster.h" #include "cluster.h"
#include <string.h> #include <cstring>
#include <cstdio> #include <cstdio>
#include <cmath> #include <cmath>
#include "unichar.h" #include "unichar.h"

View File

@ -17,7 +17,7 @@
* *
**********************************************************************/ **********************************************************************/
#include <string.h> #include <cstring>
#include <stdio.h> #include <stdio.h>
#include "tessopt.h" #include "tessopt.h"

View File

@ -22,7 +22,7 @@
#include <stdarg.h> #include <stdarg.h>
#include <limits.h> #include <limits.h>
#include <string.h> #include <cstring>
#include <map> #include <map>
#include <utility> #include <utility>
#include <algorithm> #include <algorithm>

View File

@ -25,7 +25,7 @@
// A SVMenuNode can both be used in the context_ of popup menus as well as // A SVMenuNode can both be used in the context_ of popup menus as well as
// menu bars. // menu bars.
#include <string.h> #include <cstring>
#include <iostream> #include <iostream>
#include <cstring> #include <cstring>