From 1526cf16fb2afa9258fa5426129c93f54470088b Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Fri, 22 Nov 2024 21:52:51 +0300 Subject: [PATCH] Make lists classes again. --- src/ccutil/elst.h | 16 +++++++++------- src/ccutil/elst2.h | 16 +++++++++------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/ccutil/elst.h b/src/ccutil/elst.h index e7a49095..f87e59ee 100644 --- a/src/ccutil/elst.h +++ b/src/ccutil/elst.h @@ -1110,13 +1110,15 @@ public: // add TESS_API? // move templated lists to public include dirs? -#define ELISTIZEH(CLASSNAME) \ - struct CLASSNAME##_LIST : ELIST { \ - using ELIST::ELIST; \ - }; \ - struct CLASSNAME##_IT : ELIST::ITERATOR { \ - using base = ELIST::ITERATOR; \ - using base::base; \ +#define ELISTIZEH(CLASSNAME) \ + class CLASSNAME##_LIST : public ELIST { \ + public: \ + using ELIST::ELIST; \ + }; \ + class CLASSNAME##_IT : public ELIST::ITERATOR { \ + public: \ + using base = ELIST::ITERATOR; \ + using base::base; \ }; } // namespace tesseract diff --git a/src/ccutil/elst2.h b/src/ccutil/elst2.h index e9dd35d7..ad7167a4 100644 --- a/src/ccutil/elst2.h +++ b/src/ccutil/elst2.h @@ -1159,13 +1159,15 @@ public: // add TESS_API? // move templated lists to public include dirs? -#define ELIST2IZEH(CLASSNAME) \ - struct CLASSNAME##_LIST : ELIST2 { \ - using ELIST2::ELIST2; \ - }; \ - struct CLASSNAME##_IT : ELIST2::ITERATOR { \ - using base = ELIST2::ITERATOR; \ - using base::base; \ +#define ELIST2IZEH(CLASSNAME) \ + class CLASSNAME##_LIST : public ELIST2 { \ + public: \ + using ELIST2::ELIST2; \ + }; \ + class CLASSNAME##_IT : public ELIST2::ITERATOR { \ + public: \ + using base = ELIST2::ITERATOR; \ + using base::base; \ }; } // namespace tesseract