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

Prevent use of primitive float operation functions #763

Merged
merged 7 commits into from Feb 2, 2018

Conversation

@Headline
Copy link
Member

Headline commented Feb 2, 2018

Apparently people use the float natives for actual float arithmetic; they're not really intended to be used directly. I've added a note to deter people from using these instead of their respective operators.

@asherkin

This comment has been minimized.

Copy link
Member

asherkin commented Feb 2, 2018

I'd prefer "This native is internal implementation." rather than "This native only exists to be overloaded."

Does adding #deprecated work and not carry through to the operators?

@Headline

This comment has been minimized.

Copy link
Member Author

Headline commented Feb 2, 2018

@asherkin I haven’t tested whether #depreicated will carry through, but I was under the impression that depreicated implies removal so I’m not sure if that’s what we’d want to suggest.

I suppose deprecation is only correlated with removal, so I redact that.

@asherkin

This comment has been minimized.

Copy link
Member

asherkin commented Feb 2, 2018

We want people to stop using these natives. They are not used internally in modern plugins, the JIT emits float opcodes directly, they're definitely on the removal path if we break binary compat for some reason.

@Headline

This comment has been minimized.

Copy link
Member Author

Headline commented Feb 2, 2018

The deprecation warning doesn't carry through to the overloads, so #pragma deprecated works as we'd want here. I also threw in your edit, thanks!

🚢

Copy link
Member

asherkin left a comment

I look forward to the :steamsalty:

asherkin added 5 commits Feb 2, 2018
@asherkin asherkin merged commit 12fca79 into alliedmodders:master Feb 2, 2018
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Headline Headline deleted the Headline:people-still-use-these branch Feb 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.