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

optimize toString slightly #2635

Merged
merged 1 commit into from
Jun 7, 2023
Merged

optimize toString slightly #2635

merged 1 commit into from
Jun 7, 2023

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented May 20, 2023

No description provided.

@ghost
Copy link

ghost commented May 20, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codecov
Copy link

codecov bot commented May 20, 2023

Codecov Report

Merging #2635 (e01d4a0) into main (05ccb5a) will increase coverage by 0.00%.
The diff coverage is 83.33%.

@@           Coverage Diff           @@
##             main    #2635   +/-   ##
=======================================
  Coverage   63.92%   63.92%           
=======================================
  Files         103      103           
  Lines       22306    22310    +4     
  Branches    10796    10797    +1     
=======================================
+ Hits        14259    14262    +3     
  Misses       5827     5827           
- Partials     2220     2221    +1     
Impacted Files Coverage Δ
include/exiv2/types.hpp 82.05% <83.33%> (-0.81%) ⬇️

@neheb
Copy link
Collaborator Author

neheb commented May 20, 2023

Hmmm after talking with ChatGPT, this is a bad idea on C++11. Wonder if we should remove if constexpr from public headers.

kmilos
kmilos previously approved these changes May 20, 2023
kevinbackhouse
kevinbackhouse previously approved these changes May 22, 2023
@mergify mergify bot dismissed stale reviews from kevinbackhouse and kmilos May 24, 2023 09:26

Pull request has been modified.

@neheb
Copy link
Collaborator Author

neheb commented May 24, 2023

Updated to remove if constexpr.

@kmilos I remember you saying there was some issue. Is it still present?

@kmilos
Copy link
Collaborator

kmilos commented May 24, 2023

Updated to remove if constexpr.

@kmilos I remember you saying there was some issue. Is it still present?

I'll check. You still have it in types.hpp though...

@neheb
Copy link
Collaborator Author

neheb commented May 24, 2023

Needs some work to compile properly. I'll check later.

The remaining one is in a big function. Doesn't make much sense to get rid of it there.

Also get rid of if constexpr for C++11 compatibility. The else condition
results in extra generated code as compilers are not free to promote if
to if constexpr.
@neheb
Copy link
Collaborator Author

neheb commented Jun 7, 2023

ping @kmilos

@kmilos
Copy link
Collaborator

kmilos commented Jun 7, 2023

Not seeing that constexpr error any longer w/ 0.28.x head and this PR on top of it, so good to go I guess.

P.S. It's possible I was also missing -std=c++17 when I first tried?

@neheb
Copy link
Collaborator Author

neheb commented Jun 7, 2023

@kmilos the headers should be kept C++11 compatible in any case. As mentioned earlier, the if constexpr stuff should also be removed.

@neheb neheb merged commit d234d63 into Exiv2:main Jun 7, 2023
108 checks passed
@neheb neheb deleted the 23 branch June 7, 2023 14:45
@neheb
Copy link
Collaborator Author

neheb commented Jun 7, 2023

@Mergifyio backport 0.28.x

@mergify
Copy link
Contributor

mergify bot commented Jun 7, 2023

backport 0.28.x

✅ Backports have been created

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.

None yet

3 participants