Skip to content

Commit

Permalink
Remove code for _MSC_VER < 1900
Browse files Browse the repository at this point in the history
Tesseract does not support Visual C++ older than Visual Studio 2015.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Oct 9, 2018
1 parent c375f4f commit f94b3fd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
5 changes: 0 additions & 5 deletions src/ccutil/platform.h
Expand Up @@ -32,11 +32,6 @@
#define ultoa _ultoa
#endif /* __GNUC__ */
#define SIGNED
#if defined(_MSC_VER)
#if (_MSC_VER < 1900)
#define snprintf _snprintf
#endif
#endif /* defined(_MSC_VER) */
#else
#include <climits>
#ifndef PATH_MAX
Expand Down
4 changes: 2 additions & 2 deletions src/lstm/weightmatrix.cpp
Expand Up @@ -27,11 +27,11 @@

namespace tesseract {

#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(ANDROID)
#if defined(ANDROID)
static inline double log2(double n) {
return log(n) / log(2.0);
}
#endif // _MSC_VER
#endif // ANDROID

// Number of iterations after which the correction effectively becomes unity.
const int kAdamCorrectionIterations = 200000;
Expand Down
8 changes: 0 additions & 8 deletions src/viewer/svutil.h
Expand Up @@ -25,16 +25,8 @@
#define TESSERACT_VIEWER_SVUTIL_H_

#ifdef _WIN32
#ifndef __GNUC__
#include <windows.h>
#include "platform.h"
#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
#else
#include "platform.h"
#include <windows.h>
#endif
#else
#include <pthread.h>
#include <semaphore.h>
Expand Down
4 changes: 2 additions & 2 deletions src/wordrec/language_model.cpp
Expand Up @@ -43,11 +43,11 @@ namespace tesseract {
class LMPainPoints;
struct FontInfo;

#if (defined(_MSC_VER) && _MSC_VER < 1900) || defined(ANDROID)
#if defined(ANDROID)
static inline double log2(double n) {
return log(n) / log(2.0);
}
#endif // _MSC_VER
#endif // ANDROID

const float LanguageModel::kMaxAvgNgramCost = 25.0f;

Expand Down

0 comments on commit f94b3fd

Please sign in to comment.