diff --git a/include/matx/core/half.h b/include/matx/core/half.h index 81f10b8c9..e1f7276c9 100644 --- a/include/matx/core/half.h +++ b/include/matx/core/half.h @@ -51,20 +51,17 @@ template struct alignas(sizeof(T)) matxHalf { using value_type = T; ///< Type of half /** - * @brief Initialize to zero + * @brief Default constructor * */ - __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalf() : x(0.0f) {} + __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalf() = default; /** - * @brief Copy constructor + * @brief Default copy constructor * * @param x_ Parameter to copy */ - __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalf(const matxHalf &x_) noexcept - : x(x_.x) - { - } + __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalf(const matxHalf &x_) noexcept = default; /** * @brief Copy constructor from arbitrary type @@ -79,7 +76,7 @@ template struct alignas(sizeof(T)) matxHalf { } /** - * @brief Default desctructor + * @brief Default destructor * */ __MATX_INLINE__ ~matxHalf() = default; @@ -115,16 +112,11 @@ template struct alignas(sizeof(T)) matxHalf { } /** - * @brief Copy assignment operator + * @brief Default copy assignment operator * * @param rhs Value to copy */ - __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalf & - operator=(const matxHalf &rhs) - { - x = rhs.x; - return *this; - } + __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalf &operator=(const matxHalf &rhs) = default; /** * @brief Copy assignment operator diff --git a/include/matx/core/half_complex.h b/include/matx/core/half_complex.h index c8853641d..1d4bca50d 100644 --- a/include/matx/core/half_complex.h +++ b/include/matx/core/half_complex.h @@ -53,10 +53,10 @@ template struct alignas(sizeof(T) * 2) matxHalfComplex { using value_type = T; ///< Type trait to get type /** - * @brief Constructor a half complex object with defaults of zero + * @brief Default constructor * */ - __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalfComplex() : x(0.0f), y(0.0f) {} + __MATX_HOST__ __MATX_DEVICE__ __MATX_INLINE__ matxHalfComplex() = default; /** * @brief Copy constructor from a complex float