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

Clean-up Deprecated API Usage #21

Open
azoitl opened this issue Apr 2, 2022 · 10 comments
Open

Clean-up Deprecated API Usage #21

azoitl opened this issue Apr 2, 2022 · 10 comments

Comments

@azoitl
Copy link
Contributor

azoitl commented Apr 2, 2022

Several of the API elements marked as deprecated are used through out the GEF code base. As a first step for clean-up it would be good to replace this usage with the according replacement APIs.

@github-actions
Copy link

github-actions bot commented Jul 2, 2022

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jul 2, 2022
@github-actions
Copy link

This issue was closed because it has been inactive for 180 days since being marked as stale.

@azoitl
Copy link
Contributor Author

azoitl commented Dec 30, 2022

This will be a longer going effort. Therfore I reopen it it so that we have it as notification in the open issue list.

@azoitl azoitl reopened this Dec 30, 2022
@github-actions github-actions bot removed the stale label Dec 31, 2022
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Mar 31, 2023
@github-actions
Copy link

This issue was closed because it has been inactive for 180 days since being marked as stale.

@azoitl
Copy link
Contributor Author

azoitl commented Jan 6, 2024

While working through the different deprecated fields and methods in GEF Classic I came across Point::getDistance2. This method calculates the squared distance between to points. The deprecation comment their states that instead getDistance() should be used and if needed the results squared.

I checked the usage of getDistance2and it is mainly used to sort things according to distance. For this the getDistance2 has a much higher performance (sqrt, which is used in getDistance2is in general slow) and also a higher resolution. Therefore I don't think thisgetDistance2should be deprecated. If no one objects I would remove the deprecation from getDistance2and only change the return value from int to long. This is has no impact on the API and increases the utility.

Did I miss anything? Any opinion from @ptziegler, @Destrolaric, or @Phillipus?

@ptziegler
Copy link
Contributor

I really don't like the method name, so because of that alone, I would keep it deprecated. What about creating a new method getDistanceSquared() and have getDistance2() simply delegate to it?

@l3002
Copy link

l3002 commented Jan 15, 2024

Hey @azoitl, I would like to contribute to this issue, just wanted to run that by you once. There wouldn't be any problem if I submit a PR in near future, would it?

@azoitl
Copy link
Contributor Author

azoitl commented Jan 15, 2024

Hey @azoitl, I would like to contribute to this issue, just wanted to run that by you once. There wouldn't be any problem if I submit a PR in near future, would it?

@l3002 we are happy for any support. Feel free to contribute.

@wiresketch
Copy link
Contributor

Please see #383 for the breaking change caused by the last merge.

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

No branches or pull requests

4 participants