File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -492,38 +492,33 @@ - (NSString *)recognizedText
492492
493493- (G8Orientation)orientation
494494{
495- if (self.layoutAnalysed == NO ) {
496- [self analyseLayout ];
497- }
495+ [self analyseLayout ];
498496 return _orientation;
499497}
500498
501499- (G8WritingDirection)writingDirection
502500{
503- if (self.layoutAnalysed == NO ) {
504- [self analyseLayout ];
505- }
501+ [self analyseLayout ];
506502 return _writingDirection;
507503}
508504
509505- (G8TextlineOrder)textlineOrder
510506{
511- if (self.layoutAnalysed == NO ) {
512- [self analyseLayout ];
513- }
507+ [self analyseLayout ];
514508 return _textlineOrder;
515509}
516510
517511- (CGFloat)deskewAngle
518512{
519- if (self.layoutAnalysed == NO ) {
520- [self analyseLayout ];
521- }
513+ [self analyseLayout ];
522514 return _deskewAngle;
523515}
524516
525517- (void )analyseLayout
526518{
519+ // Only perform the layout analysis if we haven't already
520+ if (self.layoutAnalysed ) return ;
521+
527522 tesseract::Orientation orientation;
528523 tesseract::WritingDirection direction;
529524 tesseract::TextlineOrder order;
You can’t perform that action at this time.
0 commit comments