Saves a copy of the word_choice if it has the best unadjusted rating. Returns true if the word_choice was the new best.
| 594 | // Saves a copy of the word_choice if it has the best unadjusted rating. |
| 595 | // Returns true if the word_choice was the new best. |
| 596 | bool WERD_RES::LogNewRawChoice(WERD_CHOICE* word_choice) { |
| 597 | if (raw_choice == NULL || word_choice->rating() < raw_choice->rating()) { |
| 598 | delete raw_choice; |
| 599 | raw_choice = new WERD_CHOICE(*word_choice); |
| 600 | raw_choice->set_permuter(TOP_CHOICE_PERM); |
| 601 | return true; |
| 602 | } |
| 603 | return false; |
| 604 | } |
| 605 | |
| 606 | // Consumes word_choice by adding it to best_choices, (taking ownership) if |
| 607 | // the certainty for word_choice is some distance of the best choice in |
no test coverage detected