Skip to content

Commit dc2515b

Browse files
committed
bad fix, remove the bool from python bindings
1 parent 5784292 commit dc2515b

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

include/openPMD/auxiliary/Memory.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ namespace auxiliary
8787

8888
// @todo implementation must distinguish const types
8989
template <typename T>
90-
WriteBuffer const &operator=(std::shared_ptr<T> const &ptr);
91-
WriteBuffer const &operator=(UniquePtrWithLambda<void> ptr);
90+
WriteBuffer &operator=(std::shared_ptr<T> const &ptr);
91+
WriteBuffer &operator=(UniquePtrWithLambda<void> ptr);
9292

9393
void const *get() const;
9494

src/auxiliary/Memory.cpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ WriteBuffer::WriteBuffer(WriteBuffer &&) noexcept = default;
220220
WriteBuffer &WriteBuffer::operator=(WriteBuffer &&) noexcept = default;
221221

222222
template <typename T>
223-
WriteBuffer const &WriteBuffer::operator=(std::shared_ptr<T> const &ptr)
223+
WriteBuffer &WriteBuffer::operator=(std::shared_ptr<T> const &ptr)
224224
{
225225
if constexpr (std::is_const_v<T>)
226226
{
@@ -234,7 +234,7 @@ WriteBuffer const &WriteBuffer::operator=(std::shared_ptr<T> const &ptr)
234234
}
235235
return *this;
236236
}
237-
WriteBuffer const &WriteBuffer::operator=(UniquePtrWithLambda<void> ptr)
237+
WriteBuffer &WriteBuffer::operator=(UniquePtrWithLambda<void> ptr)
238238
{
239239
m_buffer =
240240
std::make_any<WriteBufferTypes>(CopyableUniquePtr(std::move(ptr)));
@@ -254,17 +254,14 @@ void const *WriteBuffer::get() const
254254

255255
#define OPENPMD_INSTANTIATE(dtype) \
256256
template WriteBuffer::WriteBuffer(std::shared_ptr<dtype>); \
257-
template WriteBuffer const &WriteBuffer::operator=( \
257+
template WriteBuffer &WriteBuffer::operator=( \
258258
std::shared_ptr<dtype> const &);
259259

260-
// currently not instantiating <T const> types, this class is internal and we
261-
// dont need it
262-
OPENPMD_FOREACH_DATASET_DATATYPE(OPENPMD_INSTANTIATE)
260+
OPENPMD_FOREACH_NONVECTOR_DATATYPE(OPENPMD_INSTANTIATE)
263261
template WriteBuffer::WriteBuffer(std::shared_ptr<void>);
264-
template WriteBuffer const &
265-
WriteBuffer::operator=(std::shared_ptr<void> const &);
262+
template WriteBuffer &WriteBuffer::operator=(std::shared_ptr<void> const &);
266263
template WriteBuffer::WriteBuffer(std::shared_ptr<void const>);
267-
template WriteBuffer const &
264+
template WriteBuffer &
268265
WriteBuffer::operator=(std::shared_ptr<void const> const &);
269266
#undef OPENPMD_INSTANTIATE
270267
} // namespace openPMD::auxiliary

0 commit comments

Comments
 (0)