Skip to content

Commit 680bfdd

Browse files
committed
Remove code for old versions of Leptonica
Those versions are no longer supported. Signed-off-by: Stefan Weil <[email protected]>
1 parent e8d477c commit 680bfdd

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

ccmain/equationdetect.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,6 @@ void EquationDetect::IdentifySeedParts() {
624624
}
625625

626626
float EquationDetect::ComputeForegroundDensity(const TBOX& tbox) {
627-
#if LIBLEPT_MINOR_VERSION < 69 && LIBLEPT_MAJOR_VERSION <= 1
628-
// This will disable the detector because no seed will be identified.
629-
return 1.0f;
630-
#else
631627
Pix *pix_bi = lang_tesseract_->pix_binary();
632628
int pix_height = pixGetHeight(pix_bi);
633629
Box* box = boxCreate(tbox.left(), pix_height - tbox.top(),
@@ -639,7 +635,6 @@ float EquationDetect::ComputeForegroundDensity(const TBOX& tbox) {
639635
boxDestroy(&box);
640636

641637
return fract;
642-
#endif
643638
}
644639

645640
bool EquationDetect::CheckSeedFgDensity(const float density_th,

textord/linefind.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,8 @@ void LineFinder::FindAndRemoveLines(int resolution, bool debug, Pix* pix,
306306
pixDestroy(&pix_non_hline);
307307
pixDestroy(&pix_intersections);
308308
if (pixa_display != NULL) {
309-
#if LIBLEPT_MINOR_VERSION >= 69 || LIBLEPT_MAJOR_VERSION > 1
310309
pixaConvertToPdf(pixa_display, resolution, 1.0f, 0, 0, "LineFinding",
311310
"vhlinefinding.pdf");
312-
#endif
313311
pixaDestroy(&pixa_display);
314312
}
315313
PERF_COUNT_END

0 commit comments

Comments
 (0)