mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-30 23:49:05 +08:00
Remove member function UnicityTable<T>::contains
It was only used once, and the code using it can be simplified. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
3313bb794b
commit
739057c586
@ -69,11 +69,6 @@ public:
|
||||
return table_.get_index(object);
|
||||
}
|
||||
|
||||
/// Return true if T is in the table
|
||||
bool contains(T object) const {
|
||||
return get_index(object) != -1;
|
||||
}
|
||||
|
||||
/// Return true if the id is valid
|
||||
T contains_id(int id) const {
|
||||
return table_.contains_index(id);
|
||||
|
@ -509,11 +509,7 @@ INT_TEMPLATES_STRUCT *Classify::CreateIntTemplates(CLASSES FloatProtos,
|
||||
for (unsigned i = 0; i < fs.size(); ++i) {
|
||||
fs[i] = FClass->font_set.at(i);
|
||||
}
|
||||
if (this->fontset_table_.contains(fs)) {
|
||||
IClass->font_set_id = this->fontset_table_.get_index(fs);
|
||||
} else {
|
||||
IClass->font_set_id = this->fontset_table_.push_back(fs);
|
||||
}
|
||||
IClass->font_set_id = this->fontset_table_.push_back(fs);
|
||||
AddIntClass(IntTemplates, ClassId, IClass);
|
||||
|
||||
for (ProtoId = 0; ProtoId < FClass->NumProtos; ProtoId++) {
|
||||
|
Loading…
Reference in New Issue
Block a user