-
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
more SonarLint cleanups #2531
more SonarLint cleanups #2531
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2531 +/- ##
==========================================
- Coverage 63.97% 63.91% -0.07%
==========================================
Files 103 103
Lines 22467 22389 -78
Branches 10858 10829 -29
==========================================
- Hits 14374 14309 -65
+ Misses 5872 5862 -10
+ Partials 2221 2218 -3
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
ca82db6
to
31bbecf
Compare
@kevinbackhouse what do you think about the if constexpr change? |
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.
In general the changes look good. I just made some comments and questions before approving
src/sonymn_int.cpp
Outdated
} | ||
|
||
static auto getFocusMode2(const ExifData* metadata, uint32_t& val) { | ||
static uint32_t getFocusMode2(const ExifData* metadata) { |
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.
Did you check for this change if FocusMode2 value could be 0
? In case this field can take this value, we would need to return another value to indicate an error in the operation.
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.
No. I just assumed there are tests for this.
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 agree with @piponazo: I'd prefer to keep the separate Boolean return value to indicate success on all of these functions, to avoid the potential confusion if the field contains ""
or 0
.
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.
removed.
2c13910
to
e99fd71
Compare
c6904bb
to
aac5f54
Compare
@neheb: That's very cool. I never saw that C++ feature before. |
c6c90dd
to
4c002da
Compare
src/safe_op.hpp
Outdated
} | ||
return num < 0 ? -num : num; | ||
return std::abs(num); |
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.
The type isn't signed here so I don't think there's any need to use std::abs
.
return std::abs(num); | |
return num; |
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
0620d65
to
53482f3
Compare
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with google-readability-avoid-underscore-in-googletest-name Signed-off-by: Rosen Penev <rosenp@gmail.com>
Because of Impl, there's no way this can work properly. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Just make it part of the template Signed-off-by: Rosen Penev <rosenp@gmail.com>
Seems to trip up MemorySanitizer on ARM32. Also applied various simplifications to the code using std::filesystem Signed-off-by: Rosen Penev <rosenp@gmail.com>
Found with: google-runtime-references Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
No description provided.