From 9f17a3fdd0da907573cbef99ebb73a014b55563a Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Sat, 23 Nov 2024 19:48:41 +0300 Subject: [PATCH] Move small function into a header. --- src/ccutil/errcode.cpp | 4 ---- src/ccutil/errcode.h | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ccutil/errcode.cpp b/src/ccutil/errcode.cpp index e6b05c213c..a67aba56de 100644 --- a/src/ccutil/errcode.cpp +++ b/src/ccutil/errcode.cpp @@ -86,8 +86,4 @@ void ERRCODE::error( // handle error } } -void ERRCODE::error(const char *caller, TessErrorLogCode action) const { - error(caller, action, nullptr); -} - } // namespace tesseract diff --git a/src/ccutil/errcode.h b/src/ccutil/errcode.h index e23fcbb953..5f4e5713fa 100644 --- a/src/ccutil/errcode.h +++ b/src/ccutil/errcode.h @@ -43,7 +43,9 @@ class TESS_API ERRCODE { // error handler class TessErrorLogCode action, // action to take const char *format, ... // fprintf format ) const __attribute__((format(printf, 4, 5))); - void error(const char *caller, TessErrorLogCode action) const; + void error(const char *caller, TessErrorLogCode action) const { + error(caller, action, nullptr); + } constexpr ERRCODE(const char *string) : message(string) {} // initialize with string };