-
Notifications
You must be signed in to change notification settings - Fork 128
Some stl related cppcheck fixes #39072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8b034a2
to
82dec3f
Compare
82dec3f
to
99b8f4f
Compare
jclarkeSTFC
approved these changes
Apr 1, 2025
peterfpeterson
pushed a commit
to peterfpeterson/mantid
that referenced
this pull request
Apr 1, 2025
* some stl related cppchecks * additional ccpcheck fixes from line numbers moving * remove fix that I think is causing the test failure * use std optional to avoid uninitialised warning
peterfpeterson
added a commit
that referenced
this pull request
Apr 1, 2025
* Cppcheck suppressions set 56 (#38744) * Cppcheck suppressions set 56 * Remove lines from suppressions and other fixes Py_RETURN_NONE renamed to Py_NONE and return removed (now to be done manually) as not used anywhere else and was confusing cppcheck with missing return. Had to make lambda function wrapper if wanted to return const pointer in AlgorithmProperty.cpp Co-authored-by: Mohamed Almaki <MohamedAlmaki@users.noreply.github.com> * Not use macro to return * Replace std::function pointer with a C style function pointer * Update Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp Co-authored-by: Gui Maciel Pereira <80104863+GuiMacielPereira@users.noreply.github.com> * Update Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp Co-authored-by: Gui Maciel Pereira <80104863+GuiMacielPereira@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Framework/PythonInterface/mantid/api/src/Exports/IFunction1D.cpp Co-authored-by: Gui Maciel Pereira <80104863+GuiMacielPereira@users.noreply.github.com> * Update Framework/PythonInterface/mantid/api/src/Exports/IPeakFunction.cpp Co-authored-by: Gui Maciel Pereira <80104863+GuiMacielPereira@users.noreply.github.com> * Revert constParameterCallback suppression fix --------- Co-authored-by: Mohamed Almaki <MohamedAlmaki@users.noreply.github.com> Co-authored-by: Mohammed Almakki <mohammed.almakki@stfc.ac.uk> Co-authored-by: Gui Maciel Pereira <80104863+GuiMacielPereira@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * fix some of the simpler knownConditionTrueFalse warnings (#39004) * fix some knownConditionTrueFalse warnings * fix cascading ccpcheck warnings * Review suggestions Co-authored-by: James Clarke <james.clarke@stfc.ac.uk> --------- Co-authored-by: James Clarke <james.clarke@stfc.ac.uk> * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/mirrors-clang-format: v19.1.7 → v20.1.0](pre-commit/mirrors-clang-format@v19.1.7...v20.1.0) - [github.com/astral-sh/ruff-pre-commit: v0.9.10 → v0.11.2](astral-sh/ruff-pre-commit@v0.9.10...v0.11.2) remove unnecessary brackets Update cppcheck suppression line number * Pin conda=25.1.1 to avoid CMake FindPython error in Windows packaging (#39119) * A variety of Cppcheck fixes (#39115) * Delete unnecessary virtual destructors. * Fixes for ImportMDHistoWorkspaceBase The member variable nbins is unused, and was shadowed inside a method. Also made some variables in that method const. * AlgorithmDialog missing const in a few places * Fix some return by reference in FitPropertyBrowser * Fix several passedByValue Cppcheck warnings * Further Cppcheck fixes * Some stl related cppcheck fixes (#39072) * some stl related cppchecks * additional ccpcheck fixes from line numbers moving * remove fix that I think is causing the test failure * use std optional to avoid uninitialised warning * Pin pydantic to fix failing test --------- Co-authored-by: RichardWaiteSTFC <55979119+RichardWaiteSTFC@users.noreply.github.com> Co-authored-by: Mohamed Almaki <MohamedAlmaki@users.noreply.github.com> Co-authored-by: Mohammed Almakki <mohammed.almakki@stfc.ac.uk> Co-authored-by: Gui Maciel Pereira <80104863+GuiMacielPereira@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jonathan Haigh <35813666+jhaigh0@users.noreply.github.com> Co-authored-by: James Clarke <james.clarke@stfc.ac.uk> Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk> Co-authored-by: James Clarke <139879523+jclarkeSTFC@users.noreply.github.com> Co-authored-by: sf1919 <sarah.foxley@stfc.ac.uk>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
ISIS: Core
Issue and pull requests at ISIS that relate to Core features and functions
Maintenance
Unassigned issues to be addressed in the next maintenance period.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of work
std::string.starts_with
warningsuseStlAlg
warningsThere is no associated issue.
To test:
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.