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

Remove redundant move in return statement #7488

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindings/python/src/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct entry_to_python
result.append(*i);
}

return std::move(result);
return result;
}

static object convert(entry::dictionary_type const& d)
Expand All @@ -30,7 +30,7 @@ struct entry_to_python
for (entry::dictionary_type::const_iterator i(d.begin()), e(d.end()); i != e; ++i)
result[bytes(i->first)] = i->second;

return std::move(result);
return result;
}

static object convert0(entry const& e)
Expand Down
6 changes: 3 additions & 3 deletions src/alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,7 @@ namespace {
for (int i = 0; i < m_v6_num_peers; i++)
peers.push_back(aux::read_v6_endpoint<tcp::endpoint>(v6_ptr));

return std::move(peers);
return peers;
}

dht_direct_response_alert::dht_direct_response_alert(
Expand Down Expand Up @@ -2819,7 +2819,7 @@ namespace {
nodes.emplace_back(ih, aux::read_v6_endpoint<udp::endpoint>(v6_ptr));
}

return std::move(nodes);
return nodes;
}
}

Expand Down Expand Up @@ -2931,7 +2931,7 @@ namespace {
char const* ptr = m_alloc.get().ptr(m_samples_idx);
std::memcpy(samples.data(), ptr, samples.size() * 20);

return std::move(samples);
return samples;
}

int dht_sample_infohashes_alert::num_nodes() const
Expand Down
2 changes: 1 addition & 1 deletion src/session_stats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ namespace {
stats[i].type = metrics[i].value_index >= counters::num_stats_counters
? metric_type_t::gauge : metric_type_t::counter;
}
return std::move(stats);
return stats;
}

int find_metric_idx(string_view name)
Expand Down
6 changes: 3 additions & 3 deletions src/torrent_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ namespace libtorrent {
{
aux::vector<std::int64_t, file_index_t> ret;
sync_call(&torrent::file_progress, std::ref(ret), flags);
return std::move(ret);
return ret;
}

void torrent_handle::post_file_progress(file_progress_flags_t const flags) const
Expand Down Expand Up @@ -542,7 +542,7 @@ namespace libtorrent {
aux::vector<download_priority_t, piece_index_t> ret;
auto retp = &ret;
sync_call(&torrent::piece_priorities, retp);
return std::move(ret);
return ret;
}

#if TORRENT_ABI_VERSION == 1
Expand Down Expand Up @@ -598,7 +598,7 @@ namespace libtorrent {
aux::vector<download_priority_t, file_index_t> ret;
auto retp = &ret;
sync_call(&torrent::file_priorities, retp);
return std::move(ret);
return ret;
}

#if TORRENT_ABI_VERSION == 1
Expand Down
Loading