mirror of https://github.com/vitalif/openscad
Use iterator as dest instead of a vector, for flexibility
parent
d7175c7d01
commit
90b647ec48
|
@ -51,10 +51,9 @@ public:
|
|||
/*!
|
||||
Copies the internal vector to the given destination
|
||||
*/
|
||||
void copy(std::vector<T> &dest) {
|
||||
template <class OutputIterator> void copy(OutputIterator dest) {
|
||||
this->getArray();
|
||||
dest.resize(this->vec.size());
|
||||
std::copy(this->vec.begin(), this->vec.end(), dest.begin());
|
||||
std::copy(this->vec.begin(), this->vec.end(), dest);
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in New Issue