-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Add const lvalue ref to container parameters #51156
Conversation
690bd67
to
b87f72b
Compare
374e57c
to
1c64d04
Compare
This would probably be good to rebase, its a nice clean up. |
As mentioned above, needs a rebase, but is a welcome change. |
Oh my bad, I think there was some communication mixup here, I meant to do this to the methods you already modified Would you be able to split this back up? I'd suggest creating a new branch with this state, and then pulling the old version i.e. the commit |
2e634fe
to
eebee52
Compare
If you need help with resetting this please don't hesitate to ask, I'd prefer to merge this with the original set of changes and review the remaining later as it's much larger in scope 🙂 |
Will it be necessary to create another PR with that old branch? Because the commit doesn't change the engine's behavior and the changes are very simple |
You'd create a new branch from this one, and then reset this one, you can then create a new PR with the larger changes The changes needs to be reviewed to prevent any issues, it can have messy side effects that can be hard to predict, your current changes aren't trivial and involves copying data in some cases, that'd require a more thorough review Either this can be merged now with the original changes, or reviewed later with a larger scope, I'm not comfortable merging it without further review in its current state 🙂 Seeing it's almost 500 files it'd take me a very long time to review and I at least can't dedicate that time at the moment, so even with those changes separated off this should really be at least a few different PRs to aid review |
core/core_bind.cpp
Outdated
@@ -52,11 +52,13 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String & | |||
return ::ResourceLoader::load_threaded_request(p_path, p_type_hint, p_use_sub_threads, ResourceFormatLoader::CacheMode(p_cache_mode)); | |||
} | |||
|
|||
ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, Array r_progress) { | |||
ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, const Array &r_progress) { |
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.
This, for example, isn't a valid change, the argument is mutated, and should instead be:
ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, const Array &r_progress) { | |
ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const String &p_path, Array &r_progress) { |
So important to get this in a separate thing for cases that aren't obvious or simple
Note that this change happens to still work due to reference counting, but it's not the correct change, and there's a few more at least just by basically looking over a few files, so that needs deeper evaluation
eebee52
to
96a95cb
Compare
I duplicated the branch then rollbacked using this command: Should I pull another request with the remaining changes? |
They should really be split into a few different PRs, separated by part of the engine, like Easiest way is to create branches, then using |
Thanks for your patience and great work! |
Adds const lvalue reference to the core container types specified in the documentation that are declared in function parameters.
core/*
: #86966editor/*
: #88368modules/*
: #88915platform/*
: #88971servers/*
: #88972scene/*
: #88974others: #88975