Skip to content

Commit

Permalink
Fixed. replace range based for loop by regular for
Browse files Browse the repository at this point in the history
  • Loading branch information
socrat74 authored and Roman Zelenyi committed Sep 20, 2023
1 parent dc6cfb8 commit 1a29f68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ccmain/tessedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ int Tesseract::init_tesseract(const std::string &arg0, const std::string &textba
// Load the rest into sub_langs_.
// A range based for loop does not work here because langs_to_load
// might be changed in the loop when a new submodel is found.
for (auto &lang_to_load : langs_to_load) {
for (size_t idx = 0; idx < langs_to_load.size(); ++idx) {
const auto &lang_to_load = langs_to_load[idx];
if (!IsStrInList(lang_to_load, langs_not_to_load)) {
const char *lang_str = lang_to_load.c_str();
Tesseract *tess_to_init;
Expand Down

0 comments on commit 1a29f68

Please sign in to comment.