Merge pull request #115646 from Ivorforce/list-explicit-copy
Change `List` copy constructor from implicit to explicit.
This commit is contained in:
commit
1e12317895
20 changed files with 29 additions and 32 deletions
|
|
@ -372,7 +372,7 @@ void MultiplayerSynchronizer::set_multiplayer_authority(int p_peer_id, bool p_re
|
|||
|
||||
Error MultiplayerSynchronizer::_watch_changes(uint64_t p_usec) {
|
||||
ERR_FAIL_COND_V(replication_config.is_null(), FAILED);
|
||||
const List<NodePath> props = replication_config->get_watch_properties();
|
||||
const List<NodePath> props(replication_config->get_watch_properties());
|
||||
if (props.size() != watchers.size()) {
|
||||
watchers.resize(props.size());
|
||||
}
|
||||
|
|
@ -436,7 +436,7 @@ List<Variant> MultiplayerSynchronizer::get_delta_state(uint64_t p_cur_usec, uint
|
|||
List<NodePath> MultiplayerSynchronizer::get_delta_properties(uint64_t p_indexes) {
|
||||
List<NodePath> out;
|
||||
ERR_FAIL_COND_V(replication_config.is_null(), out);
|
||||
const List<NodePath> watch_props = replication_config->get_watch_properties();
|
||||
const List<NodePath> watch_props(replication_config->get_watch_properties());
|
||||
int idx = 0;
|
||||
for (const NodePath &prop : watch_props) {
|
||||
if ((p_indexes & (1ULL << idx++)) == 0) {
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ Error SceneReplicationInterface::on_replication_start(Object *p_obj, Variant p_c
|
|||
if (pending_buffer_size > 0) {
|
||||
ERR_FAIL_COND_V(!node || !sync->get_replication_config_ptr(), ERR_UNCONFIGURED);
|
||||
int consumed = 0;
|
||||
const List<NodePath> props = sync->get_replication_config_ptr()->get_spawn_properties();
|
||||
const List<NodePath> props(sync->get_replication_config_ptr()->get_spawn_properties());
|
||||
Vector<Variant> vars;
|
||||
vars.resize(props.size());
|
||||
Error err = MultiplayerAPI::decode_and_decompress_variants(vars, pending_buffer, pending_buffer_size, consumed);
|
||||
|
|
@ -823,7 +823,7 @@ void SceneReplicationInterface::_send_sync(int p_peer, const HashSet<ObjectID> &
|
|||
int size;
|
||||
Vector<Variant> vars;
|
||||
Vector<const Variant *> varp;
|
||||
const List<NodePath> props = sync->get_replication_config_ptr()->get_sync_properties();
|
||||
const List<NodePath> props(sync->get_replication_config_ptr()->get_sync_properties());
|
||||
Error err = MultiplayerSynchronizer::get_state(props, node, vars, varp);
|
||||
ERR_CONTINUE_MSG(err != OK, "Unable to retrieve sync state.");
|
||||
err = MultiplayerAPI::encode_and_compress_variants(varp.ptrw(), varp.size(), nullptr, size);
|
||||
|
|
@ -882,7 +882,7 @@ Error SceneReplicationInterface::on_sync_receive(int p_from, const uint8_t *p_bu
|
|||
ofs += size;
|
||||
continue;
|
||||
}
|
||||
const List<NodePath> props = sync->get_replication_config_ptr()->get_sync_properties();
|
||||
const List<NodePath> props(sync->get_replication_config_ptr()->get_sync_properties());
|
||||
Vector<Variant> vars;
|
||||
vars.resize(props.size());
|
||||
int consumed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue