-
Notifications
You must be signed in to change notification settings - Fork 303
some cleanups #3422
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
base: main
Are you sure you want to change the base?
some cleanups #3422
Conversation
Consistent with the rest. Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
ifdef properly. Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
A little simpler. Signed-off-by: Rosen Penev <[email protected]>
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 various code modernization and cleanup changes across the codebase, including converting stack arrays to heap-allocated buffers, modernizing template syntax with auto parameters, refactoring control flow, reorganizing header includes, and improving type safety.
Key changes:
- Replaced large stack-allocated arrays with
std::make_uniquefor better memory management - Simplified template syntax using abbreviated function templates (
autoparameters) - Refactored conditional logic to use modern C++ patterns (if-init statements, std::max)
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/xmpsidecar.cpp | Converted stack array to heap-allocated buffer using std::make_unique |
| src/webpimage.cpp | Wrapped debug helper function with EXIV2_DEBUG_MESSAGES to avoid unused code warnings |
| src/utils.hpp | Simplified template to use abbreviated function template syntax |
| src/types.cpp | Simplified template to use abbreviated function template syntax |
| src/tiffvisitor_int.cpp | Fixed type conversion (toInt64 → toUint32) and modernized variable declaration |
| src/tiffimage_int.hpp | Added types.hpp include and DataBuf forward declaration |
| src/tifffwd_int.hpp | Removed types.hpp include to reduce dependencies |
| src/tiffcomposite_int.hpp | Added types.hpp include after removal from tifffwd_int.hpp |
| src/tiffcomposite_int.cpp | Added missing standard library includes and refactored nested conditional |
| src/tags_int.hpp | Removed types.hpp include to reduce dependencies |
| src/tags_int.cpp | Modernized code with if-init statement and string_view comparison |
| src/tags.cpp | Modernized code with if-init statements (contains critical bug) |
| src/sonymn_int.hpp | Added DataBuf forward declaration and changed byte* to unsigned char* for consistency |
| src/quicktimevideo.cpp | Replaced conditional logic with std::max for cleaner code |
| src/pgfimage.cpp | Added missing standard library includes |
| src/error.cpp | Added missing standard library includes |
| src/crwimage_int.hpp | Changed signature type from constexpr string to byte array |
| src/crwimage_int.cpp | Defined signature_ as byte array and removed reinterpret_cast |
| src/convert.cpp | Fixed type conversion (toInt64 → toUint32) |
| src/basicio.cpp | Converted stack array to heap-allocated buffer using std::make_unique |
| app/exiv2app.hpp | Removed unnecessary types.hpp include |
| app/app_utils.cpp | Added missing cstdint include |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Rosen Penev <[email protected]>
No description provided.