From b74fabbea7bc4422a6891b2f5a27305b8dd8cd1b Mon Sep 17 00:00:00 2001 From: Luc Grosheintz Date: Mon, 10 Jun 2024 09:38:05 +0200 Subject: [PATCH] Clean up copy-and-move pattern. (#1017) --- include/highfive/bits/H5Slice_traits.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/highfive/bits/H5Slice_traits.hpp b/include/highfive/bits/H5Slice_traits.hpp index 65c0d39e0..e2b481a36 100644 --- a/include/highfive/bits/H5Slice_traits.hpp +++ b/include/highfive/bits/H5Slice_traits.hpp @@ -63,10 +63,10 @@ inline std::vector toSTLSizeVector(const std::vector& from) { struct RegularHyperSlab { RegularHyperSlab() = default; - RegularHyperSlab(std::vector offset_, - std::vector count_ = {}, - std::vector stride_ = {}, - std::vector block_ = {}) + RegularHyperSlab(const std::vector& offset_, + const std::vector& count_ = {}, + const std::vector& stride_ = {}, + const std::vector& block_ = {}) : offset(toHDF5SizeVector(offset_)) , count(toHDF5SizeVector(count_)) , stride(toHDF5SizeVector(stride_)) @@ -77,10 +77,10 @@ struct RegularHyperSlab { std::vector stride_ = {}, std::vector block_ = {}) { RegularHyperSlab slab; - slab.offset = offset_; - slab.count = count_; - slab.stride = stride_; - slab.block = block_; + slab.offset = std::move(offset_); + slab.count = std::move(count_); + slab.stride = std::move(stride_); + slab.block = std::move(block_); return slab; }