-
Notifications
You must be signed in to change notification settings - Fork 278
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
strcmp to == conversions #2301
strcmp to == conversions #2301
Conversation
Does the same thing. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #2301 +/- ##
=======================================
Coverage 63.53% 63.54%
=======================================
Files 118 118
Lines 19595 19595
Branches 9576 9576
=======================================
+ Hits 12450 12451 +1
+ Misses 5079 5078 -1
Partials 2066 2066
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
LGTM
@@ -24,8 +24,8 @@ uint32_t fillGap(Exiv2::Internal::IoWrapper& ioWrapper, uint32_t curr, uint32_t | |||
// class member definitions | |||
namespace Exiv2::Internal { | |||
bool TiffMappingInfo::operator==(const TiffMappingInfo::Key& key) const { | |||
return (0 == strcmp("*", make_) || 0 == strncmp(make_, key.m_.c_str(), strlen(make_))) && |
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.
This one is checking that make_
is a prefix of key.m_
, so it can't be converted to ==
.
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.
@neheb: I accidentally clicked "start a review" before, so this comment was left in a pending state.
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've created #2307 to use startsWith
here.
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.
Ah strncmp, yes.
Does the same thing.
Signed-off-by: Rosen Penev rosenp@gmail.com