Skip to content

Commit 667f56b

Browse files
committed
add move ctor for pdal::python::Array to satisfy newer MSVC
1 parent d604647 commit 667f56b

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

pdal/PyArray.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Array::~Array()
164164
ArrayIter& Array::iterator()
165165
{
166166
ArrayIter *it = new ArrayIter(m_array);
167-
m_iterators.push_back(std::unique_ptr<ArrayIter>(it));
167+
m_iterators.emplace_back((it));
168168
return *it;
169169
}
170170

pdal/PyArray.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#include <pdal/io/MemoryViewReader.hpp>
3939
#include <numpy/ndarraytypes.h>
4040

41+
#include <vector>
42+
#include <memory>
43+
4144
namespace pdal
4245
{
4346
namespace python
@@ -55,6 +58,12 @@ class PDAL_DLL Array
5558
Array(PyArrayObject* array);
5659
~Array();
5760

61+
Array(Array&& a) = default;
62+
Array& operator=(Array&& a) = default;
63+
64+
Array(const Array&) = delete;
65+
Array() = delete;
66+
5867
bool rowMajor() const { return m_rowMajor; };
5968
Shape shape() const { return m_shape; }
6069
const Fields& fields() const { return m_fields; };

pdal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.2.1"
1+
__version__ = "3.2.2"
22
__all__ = ["Pipeline", "Stage", "Reader", "Filter", "Writer", "dimensions", "info"]
33

44
from . import libpdalpython

0 commit comments

Comments
 (0)