mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
Fix CID 1386109 (Logically dead code)
The else statement is never executed. Remove also an unused element from the names array and add the "static" attribute. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
c3ed6f0360
commit
11609f9509
@ -39,7 +39,7 @@ enum ClassifierName {
|
||||
CN_COUNT
|
||||
};
|
||||
|
||||
const char* names[] = {"pruner", "full", nullptr};
|
||||
static const char* names[] = {"pruner", "full"};
|
||||
|
||||
static tesseract::ShapeClassifier* InitializeClassifier(
|
||||
const char* classifer_name, const UNICHARSET& unicharset,
|
||||
@ -83,9 +83,6 @@ static tesseract::ShapeClassifier* InitializeClassifier(
|
||||
shape_classifier = new tesseract::TessClassifier(true, classify);
|
||||
} else if (classifier == CN_FULL) {
|
||||
shape_classifier = new tesseract::TessClassifier(false, classify);
|
||||
} else {
|
||||
fprintf(stderr, "%s tester not yet implemented\n", classifer_name);
|
||||
return nullptr;
|
||||
}
|
||||
tprintf("Testing classifier %s:\n", classifer_name);
|
||||
return shape_classifier;
|
||||
|
Loading…
Reference in New Issue
Block a user