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

Little optimization on getAdded/Removed activeobjects per player loop. #3008

Closed

Conversation

nerzhul
Copy link
Member

@nerzhul nerzhul commented Aug 5, 2015

Use std::queue instead of std::set, we don't need a so heavy container.
Don't convert position to int to convert it to float in the next function

Use std::queue instead of std::set, we don't need a so heavy container.
Don't convert position to int to convert it to float in the next function
@nerzhul nerzhul added @ Server / Client / Env. Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements labels Aug 5, 2015
@nerzhul
Copy link
Member Author

nerzhul commented Aug 5, 2015

@est31 if you get time to review this easy PR (some lines because of coding style)

infostream<<"ServerEnvironment::getRemovedActiveObjects():"
<<" object in current_objects is NULL"<<std::endl;
removed_objects.insert(id);
if(object == NULL) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space

@est31
Copy link
Contributor

est31 commented Aug 5, 2015

This is something for after the freeze.

@nerzhul
Copy link
Member Author

nerzhul commented Aug 6, 2015

Oh i was a little bit tired when fixing coding style, doing it soon

@est31
Copy link
Contributor

est31 commented Sep 18, 2015

@nerzhul do you have time now?

@est31
Copy link
Contributor

est31 commented Sep 19, 2015

Did the changes myself :-) 9c635f2

@est31 est31 closed this Sep 19, 2015
@nerzhul nerzhul deleted the add_remove_ao_perplayer_improvement branch January 2, 2017 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Tasks to keep the codebase and related parts in order, including architectural improvements @ Server / Client / Env.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants