-
Notifications
You must be signed in to change notification settings - Fork 299
use unique_ptr for ExifData #3329
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?
Conversation
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 refactors the TiffEncoder class to use std::unique_ptr for managing ExifData, eliminating the need for the ExifData definition in the header file.
- Changes ExifData member from value type to std::unique_ptr
- Removes the exif.hpp include from the header file
- Updates all ExifData usage to use pointer dereference syntax
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/tiffvisitor_int.hpp | Removes exif.hpp include and changes ExifData member to unique_ptr |
| src/tiffvisitor_int.cpp | Updates constructor and all methods to use pointer dereference for ExifData access |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
|
Incredible. Only clang-cl errors on what I think would be an error everywhere. Incredible. |
|
reran CI. |
|
What's the benefit of this change? Is it just so that you can delete |
|
It's never NULL. I can't use a reference here as it must be a copy. edit: looking at the code, these references probably need const/removal. Will post an alternate PR. |
c0e1f8b to
498c851
Compare
Avoids needing a definition in header. Signed-off-by: Rosen Penev <[email protected]>
Avoids needing a definition in header.