mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-03 05:01:39 +00:00
perf: Add more moves and optimize (#3845)
* Make slice constructor consistent
* Add more missing std::move for ref steals
* Add missing perfect forwarding for arg_v ctor
* Add missing move in arg_v constructor
* Revert "Add missing move in arg_v constructor"
This reverts commit 126fc7c524.
* Add another missing move in cast.h
* Optimize object move ctor
* Don't do useless move
* Make move ctor same as nb
* Make obj move ctor same as nb
* Revert changes which break MSVC
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user