Skip to content

Commit

Permalink
Make lists classes again.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Nov 22, 2024
1 parent 1355287 commit 1526cf1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions src/ccutil/elst.h
Original file line number Diff line number Diff line change
Expand Up @@ -1110,13 +1110,15 @@ class ELIST {

// add TESS_API?
// move templated lists to public include dirs?
#define ELISTIZEH(CLASSNAME) \
struct CLASSNAME##_LIST : ELIST<CLASSNAME> { \
using ELIST<CLASSNAME>::ELIST; \
}; \
struct CLASSNAME##_IT : ELIST<CLASSNAME>::ITERATOR { \
using base = ELIST<CLASSNAME>::ITERATOR; \
using base::base; \
#define ELISTIZEH(CLASSNAME) \
class CLASSNAME##_LIST : public ELIST<CLASSNAME> { \
public: \
using ELIST<CLASSNAME>::ELIST; \
}; \
class CLASSNAME##_IT : public ELIST<CLASSNAME>::ITERATOR { \
public: \
using base = ELIST<CLASSNAME>::ITERATOR; \
using base::base; \
};

} // namespace tesseract
Expand Down
16 changes: 9 additions & 7 deletions src/ccutil/elst2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1159,13 +1159,15 @@ class ELIST2 {

// add TESS_API?
// move templated lists to public include dirs?
#define ELIST2IZEH(CLASSNAME) \
struct CLASSNAME##_LIST : ELIST2<CLASSNAME> { \
using ELIST2<CLASSNAME>::ELIST2; \
}; \
struct CLASSNAME##_IT : ELIST2<CLASSNAME>::ITERATOR { \
using base = ELIST2<CLASSNAME>::ITERATOR; \
using base::base; \
#define ELIST2IZEH(CLASSNAME) \
class CLASSNAME##_LIST : public ELIST2<CLASSNAME> { \
public: \
using ELIST2<CLASSNAME>::ELIST2; \
}; \
class CLASSNAME##_IT : public ELIST2<CLASSNAME>::ITERATOR { \
public: \
using base = ELIST2<CLASSNAME>::ITERATOR; \
using base::base; \
};

} // namespace tesseract
Expand Down

0 comments on commit 1526cf1

Please sign in to comment.