-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Remove unneeded operator overload macros #4966
Conversation
Only Direction type is using two of the enable overload macros. Aside from this, only two of the overloads are even being used. Therefore, we can just define the needed overloads and remove the macros. No functional change.
looks good, some would probably argue it's good to have these for the future but I'd much rather remove them and then discuss the readdition of operator overloads when something pops up |
The scope of operators should be defined by the type's semantics, not what's currently being used. |
I think it's okay semantically to get rid of these as well. The macros are very specific to ints and I'm not sure stuff like subtracting or dividing a Direction by an int makes sense. Most existing overloads already handle semantics better (e.g. there are overloads for Square and Direction operations). As for the ones I couldn't fully get rid of:
|
The Here's the commit which added those btw 822695d |
Yes, I left operator* on int as it is |
Only Direction type is using two of the enable overload macros. Aside from this, only two of the overloads are even being used. Therefore, we can just define the needed overloads and remove the macros. closes official-stockfish#4966 No functional change.
Only Direction type is using two of the enable overload macros. Aside from this, only two of the overloads are even being used. Therefore, we can just define the needed overloads and remove the macros. closes official-stockfish#4966 No functional change.
Only Direction type is using two of the enable overload macros. Aside from this, only two of the overloads are even being used. Therefore, we can just define the needed overloads and remove the macros. closes official-stockfish#4966 No functional change.
Only Direction type is using two of the enable overload macros. Aside from this, only two of the overloads are even being used.
Therefore, we can just define the needed overloads and remove the macros.
No functional change.