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

work around windows.h min/max macros #2489

Merged
merged 1 commit into from
Feb 4, 2023
Merged

work around windows.h min/max macros #2489

merged 1 commit into from
Feb 4, 2023

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented Jan 31, 2023

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

@ghost
Copy link

ghost commented Jan 31, 2023

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Merging #2489 (39b8152) into main (527dc9f) will decrease coverage by 0.01%.
The diff coverage is 90.90%.

@@            Coverage Diff             @@
##             main    #2489      +/-   ##
==========================================
- Coverage   62.12%   62.12%   -0.01%     
==========================================
  Files         121      121              
  Lines       22828    22827       -1     
  Branches    11209    11208       -1     
==========================================
- Hits        14182    14181       -1     
  Misses       6439     6439              
  Partials     2207     2207              
Impacted Files Coverage Δ
src/basicio.cpp 51.67% <85.71%> (ø)
src/jp2image.cpp 71.24% <100.00%> (-0.07%) ⬇️
src/pngimage.cpp 62.01% <100.00%> (ø)
src/tiffcomposite_int.cpp 77.33% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@neheb
Copy link
Collaborator Author

neheb commented Jan 31, 2023

So this doesn’t fix all usages but does simplify some casting and allows using auto.

@piponazo
Copy link
Collaborator

piponazo commented Feb 3, 2023

Can you explain here what's exactly the problem? I saw you had some problems with the Meson PR, but I do not understand what's going on ... up to now this code was compiling perfectly in all platforms. Why does it fail in meson?

@neheb
Copy link
Collaborator Author

neheb commented Feb 3, 2023

It isn’t.

I noticed an issue where NOMINMAX has to be defined for Windows as windows.h has macros that interfere. CMake already does this. I tried to avoid it by using the template here which works but not with minmax() from numeric limits.

Basically, this is just a cleanup commit.

@neheb neheb merged commit 0d353ac into Exiv2:main Feb 4, 2023
@neheb neheb deleted the 5 branch February 4, 2023 07:27
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