Use default copy constructor.

vtkm::Bounds and vtkm::Range now uses default copy-constructor and
assignment operator. That way `std::is_trivially_copyable` succeeds for
these basic types.
This commit is contained in:
Utkarsh Ayachit 2017-12-21 13:29:18 -05:00
parent a81919999a
commit e349dd0d1c
2 changed files with 8 additions and 13 deletions

@ -45,6 +45,9 @@ struct Bounds
VTKM_EXEC_CONT
Bounds() {}
VTKM_EXEC_CONT
Bounds(const Bounds&) = default;
VTKM_EXEC_CONT
Bounds(const vtkm::Range& xRange, const vtkm::Range& yRange, const vtkm::Range& zRange)
: X(xRange)
@ -89,13 +92,7 @@ struct Bounds
}
VTKM_EXEC_CONT
const vtkm::Bounds& operator=(const vtkm::Bounds& src)
{
this->X = src.X;
this->Y = src.Y;
this->Z = src.Z;
return *this;
}
vtkm::Bounds& operator=(const vtkm::Bounds& src) = default;
/// \b Determine if the bounds are valid (i.e. has at least one valid point).
///

@ -49,6 +49,9 @@ struct Range
{
}
VTKM_EXEC_CONT
Range(const Range&) = default;
template <typename T1, typename T2>
VTKM_EXEC_CONT Range(const T1& min, const T2& max)
: Min(static_cast<vtkm::Float64>(min))
@ -57,12 +60,7 @@ struct Range
}
VTKM_EXEC_CONT
const vtkm::Range& operator=(const vtkm::Range& src)
{
this->Min = src.Min;
this->Max = src.Max;
return *this;
}
vtkm::Range& operator=(const vtkm::Range& src) = default;
/// \b Determine if the range is valid (i.e. has at least one valid point).
///