[Clang-tidy] fix get_elements_with_range' is deprecated #1421
Conversation
Summary of ChangesHello @Akos299, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on code modernization and warning resolution. It updates a deprecated function call to a more current alternative, ensuring better code maintainability. Additionally, it addresses a Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request refactors the get_ids_vec_where template function in PatchDataField.hpp to utilize perfect forwarding for its variadic arguments and the lambda predicate, enhancing its generic utility. This update led to changes in PatchDataLayer.hpp, where the get_vec_idx lambda was adapted to use the modified get_ids_vec_where function, including explicit value extraction from the accumulator. A review comment highlighted that a commented-out block representing the old implementation in PatchDataLayer.hpp should be removed for improved code clarity. Furthermore, in PatchScheduler.cpp, a (void) cast was introduced to explicitly ignore the [[nodiscard]] return value of patch_list.build_local(), with a review comment suggesting the use of std::ignore as a more idiomatic C++ approach and recommending the removal of the explanatory comment.
2e55c7b to
f0ca554
Compare
replace get_elements_with_range [Clang-tidy] fix get_elements_with_range' is deprecated in PatchDataLayer.hpp - Replace get_elements_with_range by get_ids_vec_where. - Fix ignoring return value of function declared with 'nodiscard' attribute [clang-diagnostic-unused-result] 156 | patch_list.build_local(); updates updates
f0ca554 to
7f04926
Compare
Workflow reportworkflow report corresponding to commit d9f45ac Pre-commit check reportPre-commit check: ✅ Test pipeline can run. Clang-tidy diff reportNo relevant changes found. You should now go back to your normal life and enjoy a hopefully sunny day while waiting for the review. Doxygen diff with
|
…e#1421) Co-authored-by: David--Cléris Timothée <timothee.davidcleris@proton.me>
…e#1421) Co-authored-by: David--Cléris Timothée <timothee.davidcleris@proton.me>
Replace get_elements_with_range by get_ids_vec_where in PatchDataLayer.hpp:542:68
Fix ignoring return value of function declared with 'nodiscard' attribute [clang-diagnostic-unused-result]
156 | patch_list.build_local() in PatchScheduler.cpp:156:5