提交 3f773549 编写于 作者: R Ray Smith

Removed unnecessary using statements and cleaned up google/non-google distinction

上级 cec10372
......@@ -27,11 +27,7 @@
#include <vector>
#include "allheaders.h" // from Leptonica
#ifdef USE_STD_NAMESPACE
using std::string;
using std::vector;
#endif
#include "platform.h"
struct Box;
......
......@@ -17,9 +17,9 @@
// Author: Ray Smith
#include <stdio.h>
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
#include "base/commandlineflags.h"
#endif // USE_STD_NAMESPACE
#endif // GOOGLE_TESSERACT
#include "baseapi.h"
#include "commontraining.h"
#include "mastertrainer.h"
......
......@@ -9,7 +9,7 @@
// limitations under the License.
#include "commandlineflags.h"
#ifdef USE_STD_NAMESPACE
#ifndef GOOGLE_TESSERACT
namespace tesseract {
bool IntFlagExists(const char* flag_name, inT32* value) {
......
......@@ -19,7 +19,7 @@
#ifndef TESSERACT_TRAINING_COMMANDLINEFLAGS_H_
#define TESSERACT_TRAINING_COMMANDLINEFLAGS_H_
#ifdef USE_STD_NAMESPACE
#ifndef GOOGLE_TESSERACT
#include <stdlib.h>
#include "tprintf.h"
......
......@@ -21,9 +21,7 @@
#include <cstdio>
#include <string>
#ifdef USE_STD_NAMESPACE
using std::string;
#endif
#include "platform.h"
namespace tesseract {
......
......@@ -16,7 +16,7 @@
// limitations under the License.
///////////////////////////////////////////////////////////////////////
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
#include "base/commandlineflags.h"
#endif
#include "commontraining.h"
......
......@@ -16,7 +16,7 @@
// limitations under the License.
///////////////////////////////////////////////////////////////////////
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
#include "base/commandlineflags.h"
#endif
#include "commontraining.h"
......
......@@ -49,7 +49,7 @@
STRING_PARAM_FLAG(fontconfig_tmpdir, "/tmp",
"Overrides fontconfig default temporary dir");
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
#include "ocr/trainingdata/typesetting/legacy_fonts.h"
BOOL_PARAM_FLAG(use_only_legacy_fonts, false,
"Overrides --fonts_dir and sets the known universe of fonts to"
......@@ -544,7 +544,7 @@ const std::vector<string>& FontUtils::ListAvailableFonts() {
if (!available_fonts_.empty()) {
return available_fonts_;
}
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
if (FLAGS_use_only_legacy_fonts) {
// Restrict view to list of fonts in legacy_fonts.h
tprintf("Using list of legacy fonts only\n");
......
......@@ -20,7 +20,7 @@
#include "config_auto.h"
#endif
#ifndef USE_STD_NAMESPACE
#ifdef GOOGLE_TESSERACT
#include "base/commandlineflags.h"
#endif
#include "commontraining.h"
......
......@@ -39,13 +39,6 @@
#include "unicode/uchar.h" // from libicu
#include "util.h"
#ifdef USE_STD_NAMESPACE
using std::map;
using std::max;
using std::min;
using std::swap;
#endif
namespace tesseract {
static const int kDefaultOutputResolution = 300;
......
......@@ -50,12 +50,6 @@
#include "unicharset.h"
#include "util.h"
#ifdef USE_STD_NAMESPACE
using std::make_pair;
using std::map;
using std::pair;
#endif
// A number with which to initialize the random number generator.
const int kRandomSeed = 0x18273645;
......
......@@ -22,9 +22,7 @@
#include <string>
#ifdef USE_STD_NAMESPACE
using std::string;
#endif
#include "platform.h"
class STATS;
class UNICHARSET;
......
......@@ -25,10 +25,7 @@
#include <string>
#include <vector>
#ifdef USE_STD_NAMESPACE
using std::string;
using std::vector;
#endif
#include "platform.h"
// StringHash is the hashing functor needed by the stl hash map.
#ifndef COMPILER_MSVC
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册