Open egorpugin opened 3 years ago
@egorpugin added the tess6.0 label
Egor, maybe you want to use a milestone instead of a label?
ok, ty :)
For the info: this ticket is blocked by api changes. See https://github.com/tesseract-ocr/tesseract/commit/7d17b72ba5d10bbd0c65a1992ddba8ec6ac1dcd0#r48512779
For leptonica raii see https://github.com/tesseract-ocr/tesseract/pull/921
After we upgraded to C++17, did cleanups on STRINGs and GenericVectors, it's time to use more RAII, more smart pointers.
Modernization must be started from unit tests and training tools. Because if we change something in core library (from the bottom), we must clean all the mess above (tess.exe, tr.tools and tests). Starting from the top is much easier.
Note that this affects only internals. We do not touch public APIs.
cc: @stweil
Upgrade tips:
std::make_unique
auto
(AAA - almost always auto):auto v = something;
std::string
orstd::string_view
(to be determined what to use and where)Some
new
places: unittests: https://pastebin.com/ki8Fpt3C (partially fixed) training tools: https://pastebin.com/puKvFT7M (partially fixed)