src/ccstruct/pageres.cpp
void WERD_RES::CloneChoppedToRebuild() {
  delete rebuild_word;
  rebuild_word = new TWERD(*chopped_word);
  SetupBoxWord();
  auto word_len = box_word->length();
  best_state.reserve(word_len);
  correct_text.reserve(word_len);
  for (unsigned i = 0; i < word_len; ++i) {
    best_state.push_back(1);
    correct_text.emplace_back("");
  }
}
// Copies the chopped_word to the rebuild_word, faking a best_state as well.
// Also sets up the output box_word.
Copies the chopped_word to the rebuild_word, faking a best_state as well.
Also sets up the output box_word.
Copies the chopped_word to the rebuild_word faking a best_state as well . Also sets up the output box_word .
void WERD_RES::CloneChoppedToRebuild() {
  delete rebuild_word;
  rebuild_word = new TWERD(*chopped_word);
  SetupBoxWord();
  auto word_len = box_word->length();
  best_state.reserve(word_len);
  correct_text.reserve(word_len);
  for (unsigned i = 0; i < word_len; ++i) {
    best_state.push_back(1);
    correct_text.emplace_back("");
  }
}
void WERD_RES :: CloneChoppedToRebuild ( ) { delete rebuild_word ; rebuild_word = new TWERD ( * chopped_word ) ; SetupBoxWord ( ) ; auto word_len = box_word -> length ( ) ; best_state . reserve ( word_len ) ; correct_text . reserve ( word_len ) ; for ( unsigned i = 0 ; i < word_len ; ++ i ) { best_state . push_back ( 1 ) ; correct_text . emplace_back ( " " ) ; } }
Copies the chopped_word to the rebuild_word, faking a best_state as well.
Copies the chopped_word to the rebuild_word faking a best_state as well .