Complete leave game retirement records#6
Conversation
Test Results 1 files - 5 1 suites - 5 1m 14s ⏱️ +57s Results for commit ad4c2fc. ± Comparison against base commit 5ec48af. This pull request removes 106 and adds 52 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Не уверен что этот каталог нужен для финального задания спринта
|
|
||
| for (const auto& object : collected_objects) { | ||
| if (object.type < loot_type_values.size()) { | ||
| score += loot_type_values.at(object.type); |
There was a problem hiding this comment.
Попробуйте использовать более целенаправленные алгоритмы - std::accumulate и аналоги вместо простого цикла с действием. Это улучшает читаемость и позволяет создавать более эффективный код. См. подробности CppCoreGuidelines ES.1
|
|
||
| return response; | ||
|
|
||
| } catch (...) { |
There was a problem hiding this comment.
Уменьшите использование catch (...). Лучше перехватывать ожидаемый тип исключений, наследник от std::exception. См. рекомендации Boost
|
|
||
| return response; | ||
|
|
||
| } catch (...) { |
antlas1
left a comment
There was a problem hiding this comment.
Хорошая работа. Отметил небольшие замечания
- Use std::accumulate instead of manual score accumulation (CppCoreGuidelines ES.1) - Replace catch(...) with catch(const std::exception&) according to Boost recommendations - Keep README as helper documentation for navigating changes; it does not affect the solution code
Implemented dog retirement by inactivity.
Added:
Autotests: 52 passed.