mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Replace at accessor by [] operator in function Classify::CreateIntTemplates
UnicityTable did not provide the [] operator, so add it for this change. Suggested-by: Egor Pugin <egor.pugin@gmail.com> Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
a806d21883
commit
369b811c99
@ -62,6 +62,13 @@ public:
|
||||
return table_.at(id);
|
||||
}
|
||||
|
||||
T &operator[](size_t id) {
|
||||
return table_[id];
|
||||
}
|
||||
const T &operator[](size_t id) const {
|
||||
return table_[id];
|
||||
}
|
||||
|
||||
/// Return the id of the T object.
|
||||
/// This method NEEDS a compare_callback to be passed to
|
||||
/// set_compare_callback.
|
||||
|
@ -509,7 +509,7 @@ INT_TEMPLATES_STRUCT *Classify::CreateIntTemplates(CLASSES FloatProtos,
|
||||
FontSet fs;
|
||||
fs.reserve(fs_size);
|
||||
for (unsigned i = 0; i < fs_size; ++i) {
|
||||
fs.push_back(FClass->font_set.at(i));
|
||||
fs.push_back(FClass->font_set[i]);
|
||||
}
|
||||
IClass->font_set_id = this->fontset_table_.push_back(fs);
|
||||
AddIntClass(IntTemplates, ClassId, IClass);
|
||||
|
Loading…
Reference in New Issue
Block a user