Skip to content

Commit b89bb09

Browse files
committed
fix a set but not used warning and cleanup some old code from 2007
1 parent f9b51d7 commit b89bb09

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

textord/wordseg.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,7 @@ inT32 row_words( //compute space size
183183
BOOL8 testing_on //for debug
184184
) {
185185
BOOL8 testing_row; //contains testpt
186-
BOOL8 prev_valid; //if decent size
187-
BOOL8 this_valid; //current blob big enough
188186
inT32 prev_x; //end of prev blob
189-
inT32 min_gap; //min interesting gap
190187
inT32 cluster_count; //no of clusters
191188
inT32 gap_index; //which cluster
192189
inT32 smooth_factor; //for smoothing stats
@@ -215,20 +212,15 @@ inT32 row_words( //compute space size
215212
testing_row = TRUE;
216213
gap_stats.add (blob_box.width (), 1);
217214
}
218-
min_gap = (inT32) floor (gap_stats.ile (textord_words_width_ile));
219215
gap_stats.clear ();
220216
for (blob_it.mark_cycle_pt (); !blob_it.cycled_list (); blob_it.forward ()) {
221217
blob = blob_it.data ();
222218
if (!blob->joined_to_prev ()) {
223219
blob_box = blob->bounding_box ();
224-
// this_valid=blob_box.width()>=min_gap;
225-
this_valid = TRUE;
226-
if (this_valid && prev_valid
227-
&& blob_box.left () - prev_x < maxwidth) {
220+
if (blob_box.left () - prev_x < maxwidth) {
228221
gap_stats.add (blob_box.left () - prev_x, 1);
229222
}
230223
prev_x = blob_box.right ();
231-
prev_valid = this_valid;
232224
}
233225
}
234226
if (gap_stats.get_total () == 0) {

0 commit comments

Comments
 (0)