diff options
Diffstat (limited to 'generator/generator.cpp')
-rw-r--r-- | generator/generator.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/generator/generator.cpp b/generator/generator.cpp index cd13051..435a63b 100644 --- a/generator/generator.cpp +++ b/generator/generator.cpp | |||
@@ -864,10 +864,16 @@ void generator::run() { | |||
864 | wanderlust_.size()); | 864 | wanderlust_.size()); |
865 | 865 | ||
866 | for (const auto& [cipher, form_id] : wanderlust_) { | 866 | for (const auto& [cipher, form_id] : wanderlust_) { |
867 | if (cipher < 100) { | ||
868 | continue; | ||
869 | } | ||
867 | for (const auto& [cipher2, form_id2] : wanderlust_) { | 870 | for (const auto& [cipher2, form_id2] : wanderlust_) { |
868 | if (cipher2 >= cipher) { | 871 | if (cipher2 >= cipher) { |
869 | break; | 872 | break; |
870 | } | 873 | } |
874 | if (cipher2 < 100) { | ||
875 | continue; | ||
876 | } | ||
871 | if (wanderlust_.count(cipher - cipher2)) { | 877 | if (wanderlust_.count(cipher - cipher2)) { |
872 | orange_addition.push_back(fmt::format( | 878 | orange_addition.push_back(fmt::format( |
873 | "[{},{},{}]", form_id2, wanderlust_[cipher - cipher2], form_id)); | 879 | "[{},{},{}]", form_id2, wanderlust_[cipher - cipher2], form_id)); |
@@ -1044,6 +1050,7 @@ size_t generator::LookupOrCreateForm(const std::string& word) { | |||
1044 | })) { | 1050 | })) { |
1045 | ciphered = 0; | 1051 | ciphered = 0; |
1046 | std::string to_cipher = word; | 1052 | std::string to_cipher = word; |
1053 | std::reverse(to_cipher.begin(), to_cipher.end()); | ||
1047 | while (!to_cipher.empty()) { | 1054 | while (!to_cipher.empty()) { |
1048 | *ciphered *= 10; | 1055 | *ciphered *= 10; |
1049 | switch (to_cipher.back()) { | 1056 | switch (to_cipher.back()) { |