-
Notifications
You must be signed in to change notification settings - Fork 288
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
use actual array instead of C string #3214
Conversation
1933024
to
809a0d5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3214 +/- ##
==========================================
- Coverage 63.93% 63.91% -0.02%
==========================================
Files 104 104
Lines 21755 21752 -3
Branches 10636 10636
==========================================
- Hits 13908 13903 -5
- Misses 5639 5641 +2
Partials 2208 2208 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e3403fd
to
55778b8
Compare
src/jpgimage.cpp
Outdated
constexpr std::array<byte, 6> exifId_{ | ||
0x45, 0x78, 0x69, 0x66, 0x00, 0x00, | ||
}; //!< Exif identifier | ||
constexpr std::array<byte, 29> xmpId_{ | ||
0x68, 0x74, 0x74, 0x70, 0x3A, 0x2F, 0x2F, 0x6E, 0x73, 0x2E, 0x61, 0x64, 0x6F, 0x62, 0x65, | ||
0x2E, 0x63, 0x6F, 0x6D, 0x2F, 0x78, 0x61, 0x70, 0x2F, 0x31, 0x2E, 0x30, 0x2F, 0x00, | ||
}; //!< XMP packet identifier |
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.
I don't like this change. These were readable strings before, but now they look like binary data.
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.
How about switching to '' notation?
C strings in C++ have an extra member for NULL termination. replacing copy_n with copy like this will allow eventual conversion to std::ranges. Signed-off-by: Rosen Penev <[email protected]>
Signed-off-by: Rosen Penev <[email protected]>
C strings in C++ have an extra member for NULL termination. replacing copy_n with copy like this will allow eventual conversion to std::ranges.
Missed changes from last PR.