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

Fix misleading msvc macro and unreachable return in swap function #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rilysh
Copy link

@rilysh rilysh commented Oct 10, 2023

Hello,
This PR addresses the following issues.

  1. In several files, the swap(...) function has used MSC_VER instead of _MSC_VER which will lead them to fall back to the manual implementation of the byte swap(...) function.
  2. If the compiler has built-in support for byte swapping then it generally will create a warning about the use of two returns, where the last one is unreachable since the built-in has already been provided. Using #else for the manual implementation (e.g. If the compiler doesn't have a built-in byte swap function), then the warning can be avoided.

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

1 participant