@ -227,14 +227,18 @@ struct sensor_magnitude_t {
}
sensor_magnitude_t ( ) = delete ;
sensor_magnitude_t & operator = ( const sensor_magnitude_t & ) = default ;
sensor_magnitude_t ( const sensor_magnitude_t & ) = default ;
sensor_magnitude_t ( sensor_magnitude_t & & other ) {
sensor_magnitude_t ( const sensor_magnitude_t & ) = delete ;
sensor_magnitude_t ( sensor_magnitude_t & & other ) noexcept {
* this = other ;
other . filter = nullptr ;
}
~ sensor_magnitude_t ( ) {
delete filter ;
}
sensor_magnitude_t ( unsigned char slot , unsigned char index_local , unsigned char type , sensor : : Unit units , BaseSensor * sensor ) ;
BaseSensor * sensor { nullptr } ; // Sensor object
@ -259,6 +263,16 @@ struct sensor_magnitude_t {
} ;
static_assert (
std : : is_nothrow_move_constructible < sensor_magnitude_t > : : value ,
" std::vector<sensor_magnitude_t> should be able to work with resize() "
) ;
static_assert (
! std : : is_copy_constructible < sensor_magnitude_t > : : value ,
" std::vector<sensor_magnitude_t> should only use move ctor "
) ;
unsigned char sensor_magnitude_t : : _counts [ MAGNITUDE_MAX ] = { 0 } ;
namespace sensor {