From 1bb38e40546d57d8fe0bfef9906b2a8eb1664b42 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Thu, 25 Apr 2024 20:50:47 +0330 Subject: [PATCH] Apply the change --- src/textord/makerow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/textord/makerow.cpp b/src/textord/makerow.cpp index 4c067e67f7..837a3e3104 100644 --- a/src/textord/makerow.cpp +++ b/src/textord/makerow.cpp @@ -2485,8 +2485,8 @@ OVERLAP_STATE most_overlapping_row( // find best row row_it->forward(); test_row = row_it->data(); if (test_row->min_y() <= top && test_row->max_y() >= bottom) { - merge_top = test_row->max_y() > row->max_y() ? test_row->max_y() : row->max_y(); - merge_bottom = test_row->min_y() < row->min_y() ? test_row->min_y() : row->min_y(); + merge_top = std::max(test_row->max_y(),row->max_y()); + merge_bottom = std::min(test_row->min_y(),row->min_y()); if (merge_top - merge_bottom <= rowsize) { if (testing_blob && textord_debug_blob) { tprintf("Merging rows at (%g,%g), (%g,%g)\n", row->min_y(), row->max_y(),