[libcamera-devel] [PATCH] libcamera: span: Use default copy assignemnt operator
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Sep 29 03:18:50 CEST 2020
The custom implementation of the copy assignment operator is identical
to the one the compiler would generate. Replace it by the default.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
include/libcamera/span.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/libcamera/span.h b/include/libcamera/span.h
index 738af6aca871..a53a80b81640 100644
--- a/include/libcamera/span.h
+++ b/include/libcamera/span.h
@@ -188,12 +188,7 @@ public:
}
constexpr Span(const Span &other) noexcept = default;
-
- constexpr Span &operator=(const Span &other) noexcept
- {
- data_ = other.data_;
- return *this;
- }
+ constexpr Span &operator=(const Span &other) noexcept = default;
constexpr iterator begin() const { return data(); }
constexpr const_iterator cbegin() const { return begin(); }
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list