diff --git a/src/ccutil/platform.h b/src/ccutil/platform.h index 808bec9dc..7c711aa20 100644 --- a/src/ccutil/platform.h +++ b/src/ccutil/platform.h @@ -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 #ifndef PATH_MAX diff --git a/src/lstm/weightmatrix.cpp b/src/lstm/weightmatrix.cpp index 82058786a..ccc77c1e9 100644 --- a/src/lstm/weightmatrix.cpp +++ b/src/lstm/weightmatrix.cpp @@ -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; diff --git a/src/viewer/svutil.h b/src/viewer/svutil.h index 570dc005e..9484a5ae2 100644 --- a/src/viewer/svutil.h +++ b/src/viewer/svutil.h @@ -25,16 +25,8 @@ #define TESSERACT_VIEWER_SVUTIL_H_ #ifdef _WIN32 -#ifndef __GNUC__ #include #include "platform.h" -#if defined(_MSC_VER) && _MSC_VER < 1900 -#define snprintf _snprintf -#endif -#else -#include "platform.h" -#include -#endif #else #include #include diff --git a/src/wordrec/language_model.cpp b/src/wordrec/language_model.cpp index b1cd48b92..dd0512751 100644 --- a/src/wordrec/language_model.cpp +++ b/src/wordrec/language_model.cpp @@ -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;