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: avoid global non const variables #1674

Merged
merged 1 commit into from
May 25, 2021
Merged

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented May 20, 2021

Found with cppcoreguidelines-avoid-non-const-global-variables

Signed-off-by: Rosen Penev rosenp@gmail.com

@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #1674 (683950b) into main (c44c289) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1674   +/-   ##
=======================================
  Coverage   66.94%   66.94%           
=======================================
  Files         151      151           
  Lines       20743    20743           
=======================================
  Hits        13886    13886           
  Misses       6857     6857           
Impacted Files Coverage Δ
include/exiv2/datasets.hpp 100.00% <ø> (ø)
samples/stringto-test.cpp 90.62% <ø> (ø)
src/cr2header_int.cpp 77.14% <ø> (ø)
src/cr2header_int.hpp 50.00% <ø> (ø)
src/datasets.cpp 51.61% <ø> (ø)
src/http.cpp 0.00% <ø> (ø)
src/jpgimage.cpp 77.45% <ø> (ø)
src/properties.cpp 80.09% <ø> (ø)
src/tags.cpp 52.41% <ø> (ø)
src/tiffimage.cpp 83.47% <ø> (ø)
... and 3 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 c44c289...683950b. Read the comment docs.

@neheb neheb force-pushed the cex branch 6 times, most recently from ff3a85a to 43a91a4 Compare May 20, 2021 02:34
@neheb
Copy link
Collaborator Author

neheb commented May 20, 2021

proper use of static constexpr member variables requires C++17. Bah.

@neheb neheb force-pushed the cex branch 2 times, most recently from 6583ff7 to 041b682 Compare May 20, 2021 06:00
Found with cppcoreguidelines-avoid-non-const-global-variables

Signed-off-by: Rosen Penev <rosenp@gmail.com>
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!

@piponazo piponazo merged commit 86c71ae into Exiv2:main May 25, 2021
@neheb neheb deleted the cex branch May 25, 2021 06:44
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