mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-03 13:03:20 +00:00
Add more missing std::move for ref steals
This commit is contained in:
parent
63dcf441a7
commit
e9eb99544e
@ -1491,7 +1491,7 @@ private:
|
||||
type_id<T>());
|
||||
#endif
|
||||
}
|
||||
args_list.append(o);
|
||||
args_list.append(std::move(o));
|
||||
}
|
||||
|
||||
void process(list &args_list, detail::args_proxy ap) {
|
||||
|
@ -640,9 +640,9 @@ private:
|
||||
|
||||
list names, formats, offsets;
|
||||
for (auto &descr : field_descriptors) {
|
||||
names.append(descr.name);
|
||||
formats.append(descr.format);
|
||||
offsets.append(descr.offset);
|
||||
names.append(std::move(descr.name));
|
||||
formats.append(std::move(descr.format));
|
||||
offsets.append(std::move(descr.offset));
|
||||
}
|
||||
return dtype(std::move(names), std::move(formats), std::move(offsets), itemsize);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ struct set_caster {
|
||||
for (auto &&value : src) {
|
||||
auto value_ = reinterpret_steal<object>(
|
||||
key_conv::cast(forward_like<T>(value), policy, parent));
|
||||
if (!value_ || !s.add(value_)) {
|
||||
if (!value_ || !s.add(std::move(value_))) {
|
||||
return handle();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user