-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Made Rect/FRect
move/move_ip
FASTCALL
#2040
Made Rect/FRect
move/move_ip
FASTCALL
#2040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that the comments need updating to reflect the newly multi-type code.
@itzpr3d4t0r I took the liberty of resolving Myre's comments about type names in comments. I also changed two error messages:
I'd like to make sure these changes are good with you. |
I'm fine with the changes. I guess we could improve error messages a bit in the two arguments case. Like right now it says "x must be a numeric value" if the first argument isn't ok and same thing but with y in the other case.
These or just the second part. I also think we could rename the |
@itzpr3d4t0r I agree, so I pushed the changes up. Is "invalid argument" redundant? If it's a bit weird I'm committing to your branch, I'm just doing it because you said you were pretty occupied with IRL stuff. |
I changed error messages to be more precise and informative. It would take a bit to make a direct comparison but generally every error message should now state what the error is, what it expected and what it got in terms of value/type. Btw I'm planning to port this way of handling errors to #1842. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good to me.
I'm a bit apprehensive of the extra code complexity to support the error messages, but you seem to have it well handled.
I have ported #1958 since the last addition of FRect. As I am still adapting, this may not be the ideal implementation. Please let me know if you know better methods. I have also added more benchmarks for FRect to account for these changes in the code.
Results (columns show old/new):
Move
Move_ip
Not part of this PR but can be taken as a reference:
The code I used: