Skip to content

Commit

Permalink
Reorder includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Dec 25, 2020
1 parent 688bb8d commit a905e8c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
16 changes: 8 additions & 8 deletions include/tesseract/baseapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,10 @@
#ifndef TESSERACT_API_BASEAPI_H_
#define TESSERACT_API_BASEAPI_H_

#include <cstdio>
#include <functional> // for std::function

#ifdef HAVE_CONFIG_H
#include "config_auto.h" // DISABLED_LEGACY_ENGINE
#endif

// To avoid collision with other typenames include the ABSOLUTE MINIMUM
// complexity of includes here. Use forward declarations wherever possible
// and hide includes of complex types in baseapi.cpp.
#include <tesseract/version.h>

#include "apitypes.h"
#include "pageiterator.h"
#include "platform.h"
Expand All @@ -40,6 +32,14 @@
#include "thresholder.h"
#include "unichar.h"

// To avoid collision with other typenames include the ABSOLUTE MINIMUM
// complexity of includes here. Use forward declarations wherever possible
// and hide includes of complex types in baseapi.cpp.
#include <tesseract/version.h>

#include <cstdio>
#include <functional> // for std::function

template <typename T>
class GenericVector;
class PAGE_RES;
Expand Down
6 changes: 3 additions & 3 deletions include/tesseract/genericvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#ifndef TESSERACT_CCUTIL_GENERICVECTOR_H_
#define TESSERACT_CCUTIL_GENERICVECTOR_H_

#include "helpers.h"
#include "serialis.h"

#include <algorithm>
#include <cassert>
#include <climits> // for LONG_MAX
Expand All @@ -27,9 +30,6 @@
#include <cstdlib>
#include <functional> // for std::function

#include "helpers.h"
#include "serialis.h"

// Use PointerVector<T> below in preference to GenericVector<T*>, as that
// provides automatic deletion of pointers, [De]Serialize that works, and
// sort that works.
Expand Down
6 changes: 3 additions & 3 deletions include/tesseract/renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
#ifndef TESSERACT_API_RENDERER_H_
#define TESSERACT_API_RENDERER_H_

#include "genericvector.h"
#include "platform.h"

// To avoid collision with other typenames include the ABSOLUTE MINIMUM
// complexity of includes here. Use forward declarations wherever possible
// and hide includes of complex types in baseapi.cpp.
#include <string> // for std::string

#include "genericvector.h"
#include "platform.h"

struct Pix;

namespace tesseract {
Expand Down
6 changes: 3 additions & 3 deletions include/tesseract/resultiterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
#ifndef TESSERACT_CCMAIN_RESULT_ITERATOR_H_
#define TESSERACT_CCMAIN_RESULT_ITERATOR_H_

#include <set> // for std::pair
#include <vector> // for std::vector

#include "ltrresultiterator.h" // for LTRResultIterator
#include "platform.h" // for TESS_API, TESS_LOCAL
#include "publictypes.h" // for PageIteratorLevel
#include "unichar.h" // for StrongScriptDirection

#include <set> // for std::pair
#include <vector> // for std::vector

template <typename T>
class GenericVector;
template <typename T>
Expand Down
4 changes: 2 additions & 2 deletions include/tesseract/strngs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#ifndef STRNGS_H
#define STRNGS_H

#include "platform.h" // for TESS_API

#include <cassert> // for assert
#include <cstdint> // for uint32_t
#include <cstdio> // for FILE
#include <cstring> // for strncpy

#include "platform.h" // for TESS_API

namespace tesseract {
class TFile;
} // namespace tesseract.
Expand Down
5 changes: 2 additions & 3 deletions include/tesseract/unichar.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@
#ifndef TESSERACT_CCUTIL_UNICHAR_H_
#define TESSERACT_CCUTIL_UNICHAR_H_

#include <memory.h>
#include "platform.h"

#include <cstring>
#include <string>
#include <vector>

#include "platform.h"
#include <memory.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.
Expand Down

0 comments on commit a905e8c

Please sign in to comment.