diff --git a/src/ccutil/unicity_table.h b/src/ccutil/unicity_table.h index 8a894036db..4108995080 100644 --- a/src/ccutil/unicity_table.h +++ b/src/ccutil/unicity_table.h @@ -62,6 +62,13 @@ class UnicityTable { 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. diff --git a/src/classify/intproto.cpp b/src/classify/intproto.cpp index b4a49c0056..854026bcc9 100644 --- a/src/classify/intproto.cpp +++ b/src/classify/intproto.cpp @@ -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);