mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-04 05:23:21 +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>());
|
type_id<T>());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
args_list.append(o);
|
args_list.append(std::move(o));
|
||||||
}
|
}
|
||||||
|
|
||||||
void process(list &args_list, detail::args_proxy ap) {
|
void process(list &args_list, detail::args_proxy ap) {
|
||||||
|
@ -640,9 +640,9 @@ private:
|
|||||||
|
|
||||||
list names, formats, offsets;
|
list names, formats, offsets;
|
||||||
for (auto &descr : field_descriptors) {
|
for (auto &descr : field_descriptors) {
|
||||||
names.append(descr.name);
|
names.append(std::move(descr.name));
|
||||||
formats.append(descr.format);
|
formats.append(std::move(descr.format));
|
||||||
offsets.append(descr.offset);
|
offsets.append(std::move(descr.offset));
|
||||||
}
|
}
|
||||||
return dtype(std::move(names), std::move(formats), std::move(offsets), itemsize);
|
return dtype(std::move(names), std::move(formats), std::move(offsets), itemsize);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ struct set_caster {
|
|||||||
for (auto &&value : src) {
|
for (auto &&value : src) {
|
||||||
auto value_ = reinterpret_steal<object>(
|
auto value_ = reinterpret_steal<object>(
|
||||||
key_conv::cast(forward_like<T>(value), policy, parent));
|
key_conv::cast(forward_like<T>(value), policy, parent));
|
||||||
if (!value_ || !s.add(value_)) {
|
if (!value_ || !s.add(std::move(value_))) {
|
||||||
return handle();
|
return handle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user