Skip to content

Commit

Permalink
Showing 9 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ccstruct/Makefile.am
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil \
-I$(top_srcdir)/viewer \
-I$(top_srcdir)/opencl
AM_CPPFLAGS += $(OPENCL_CPPFLAGS)
AM_CPPFLAGS += $(OPENCL_CPPFLAGS) -DUSE_STD_NAMESPACE

if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \
1 change: 1 addition & 0 deletions ccutil/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS =
AM_CXXFLAGS =
AM_CPPFLAGS = -DUSE_STD_NAMESPACE

if !NO_TESSDATA_PREFIX
AM_CXXFLAGS += -DTESSDATA_PREFIX=@datadir@/
6 changes: 6 additions & 0 deletions ccutil/platform.h
Original file line number Diff line number Diff line change
@@ -53,6 +53,12 @@
#define SIGNED signed
#endif

// Fix to map between google use of string without std and everywhere else.
#ifdef USE_STD_NAMESPACE

This comment has been minimized.

Copy link
@stweil

stweil Jul 15, 2017

Member

The current code includes a mixture of string without namespace and std::string. Other types from the standard namespace (like std::vector for example) always use the namespace prefix.

Wouldn't it be better to clean that situation and use std::string in the Tesseract code (avoiding that USE_STD_NAMESPACE hack)? Or is using string part of the Google coding conventions (then we'd have to replace all std::string code).

This comment has been minimized.

Copy link
@theraysmith

theraysmith via email Jul 16, 2017

Author Contributor
#include <string>
using std::string;
#endif

#if defined(_WIN32) || defined(__CYGWIN__)
#ifndef M_PI
#define M_PI 3.14159265358979323846
1 change: 1 addition & 0 deletions ccutil/unichar.h
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@
#include <string.h>
#include <string>
#include <vector>
#include "platform.h"

// Maximum number of characters that can be stored in a UNICHAR. Must be
// at least 4. Must not exceed 31 without changing the coding of length.
2 changes: 1 addition & 1 deletion classify/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/dict \
-I$(top_srcdir)/viewer
-I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE

if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \
2 changes: 1 addition & 1 deletion cutil/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer
AM_CPPFLAGS += -I$(top_srcdir)/ccutil -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE

if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \
2 changes: 1 addition & 1 deletion dict/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AM_CPPFLAGS += -I$(top_srcdir)/cutil -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE

if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \
2 changes: 1 addition & 1 deletion lstm/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
AM_CPPFLAGS += \
-I$(top_srcdir)/ccutil -I$(top_srcdir)/cutil -I$(top_srcdir)/ccstruct \
-I$(top_srcdir)/arch -I$(top_srcdir)/viewer -I$(top_srcdir)/classify \
-I$(top_srcdir)/dict -I$(top_srcdir)/lstm
-I$(top_srcdir)/dict -I$(top_srcdir)/lstm -DUSE_STD_NAMESPACE
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS =
AM_CXXFLAGS = $(OPENMP_CXXFLAGS)
2 changes: 1 addition & 1 deletion wordrec/Makefile.am
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ AM_CPPFLAGS += \
-I$(top_srcdir)/ccstruct -I$(top_srcdir)/ccutil \
-I$(top_srcdir)/cutil -I$(top_srcdir)/classify \
-I$(top_srcdir)/dict \
-I$(top_srcdir)/viewer
-I$(top_srcdir)/viewer -DUSE_STD_NAMESPACE

if VISIBILITY
AM_CPPFLAGS += -DTESS_EXPORTS \

0 comments on commit aee910a

Please sign in to comment.