Skip to content
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

clang-tidy: use auto #1660

Merged
merged 1 commit into from
May 17, 2021
Merged

clang-tidy: use auto #1660

merged 1 commit into from
May 17, 2021

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented May 17, 2021

Found with modernize-use-auto

Signed-off-by: Rosen Penev [email protected]

@codecov
Copy link

codecov bot commented May 17, 2021

Codecov Report

Merging #1660 (34d0783) into main (20dfab8) will decrease coverage by 0.00%.
The diff coverage is 70.86%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1660      +/-   ##
==========================================
- Coverage   66.93%   66.92%   -0.01%     
==========================================
  Files         151      151              
  Lines       20777    20775       -2     
==========================================
- Hits        13907    13904       -3     
- Misses       6870     6871       +1     
Impacted Files Coverage Δ
samples/Jzon.cpp 34.07% <0.00%> (ø)
samples/addmoddel.cpp 90.19% <ø> (ø)
samples/exiv2json.cpp 75.60% <0.00%> (ø)
src/actions.cpp 72.54% <0.00%> (ø)
src/crwimage_int.cpp 87.32% <0.00%> (ø)
src/image_int.cpp 41.17% <0.00%> (ø)
src/ini.cpp 7.54% <0.00%> (ø)
src/olympusmn_int.cpp 20.46% <0.00%> (ø)
src/tags.cpp 53.37% <0.00%> (ø)
src/jpgimage.cpp 77.39% <25.00%> (ø)
... and 31 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 20dfab8...34d0783. Read the comment docs.

Found with modernize-use-auto

Signed-off-by: Rosen Penev <[email protected]>
Copy link
Collaborator

@piponazo piponazo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

const byte* nullComp = (const byte*) "\0\0";
const byte* type = (const byte*) "iCCP";
const uint32_t nameLength = static_cast<uint32_t>(profileName_.size());
const auto nullComp = (const byte*)"\0\0";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😱 ! Maybe we should move these constant literals to the anonymous space and just have them like this?

namespace {
const char* nullComp = "\0\0";
const char* type = "iCCP";
}

Note: I am not complaining about the change you did here, but just to the existing code.

@piponazo piponazo merged commit b871218 into Exiv2:main May 17, 2021
@neheb neheb deleted the at branch May 17, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants