-
Notifications
You must be signed in to change notification settings - Fork 303
clazy fixes #3410
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
clazy fixes #3410
Conversation
|
Done. |
8a5fd24 to
917040a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies automated code quality improvements suggested by the clazy static analysis tool for C++. The changes focus on modern C++ best practices including pass-by-value optimization for small types, explicit deletion of copy operations, and refactoring of lookup tables to use constexpr arrays instead of std::map for compile-time efficiency.
Key changes:
- Converted small parameter types from const reference to pass-by-value (XMP_OptionBits, uint16_t, IfdId, iterators, TiffGroupKey)
- Added explicit deletion of copy constructors and copy assignment operators for several base classes
- Refactored std::map lookup tables to constexpr arrays with custom comparison operators in riffvideo.cpp and asfvideo.cpp
- Moved static functions into anonymous namespace in image.cpp
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/xmp.cpp | Changed XMP_OptionBits parameters from const reference to pass-by-value for performance |
| src/tiffvisitor_int.hpp | Added explicit copy constructor/assignment deletion to TiffVisitor base class |
| src/tiffimage_int.hpp | Added explicit copy constructor/assignment deletion to TiffHeaderBase and optimized TiffGroupKey_hash |
| src/riffvideo.cpp | Refactored std::map to constexpr arrays with custom structs for compile-time lookup |
| src/makernote_int.hpp | Added explicit copy constructor/assignment deletion to MnHeader base class |
| src/makernote_int.cpp | Optimized getExifValue parameters to pass small types by value |
| src/image.cpp | Moved static functions typeValid and visits into anonymous namespace |
| src/exif.cpp | Added explicit copy constructor/assignment deletion to Thumbnail base class |
| src/crwimage_int.hpp | Added explicit copy constructor/assignment deletion to CiffComponent base class |
| src/convert.cpp | Changed XmpData::iterator parameter to pass-by-value |
| src/asfvideo.cpp | Refactored std::map to constexpr array with custom structs and reorganized code layout |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3410 +/- ##
==========================================
+ Coverage 64.78% 64.86% +0.07%
==========================================
Files 103 114 +11
Lines 21697 21666 -31
Branches 10646 10641 -5
==========================================
- Hits 14057 14053 -4
+ Misses 5419 5391 -28
- Partials 2221 2222 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.