Correct a bad memcpy in ColorTable that gcc 7 found

This commit is contained in:
Robert Maynard 2018-05-01 17:35:26 -04:00
parent c6726644b9
commit dac7ab987a
2 changed files with 2 additions and 2 deletions

@ -132,7 +132,7 @@ inline bool rangeAlmostEqual(const vtkm::Range& r)
// needs to be a memcpy to avoid strict aliasing issues, doing a count
// of 2*sizeof(T) to couple both values at the same time
std::memcpy(irange, &r.Min, sizeof(vtkm::Int64));
std::memcpy(irange, &r.Max, sizeof(vtkm::Int64));
std::memcpy(irange + 1, &r.Max, sizeof(vtkm::Int64));
// determine the absolute delta between these two numbers.
const vtkm::Int64 delta = std::abs(irange[1] - irange[0]);
// If the numbers are not nearly equal, we don't touch them. This avoids running into

@ -70,7 +70,7 @@ private:
"Unexpected scalar field range.");
}
template <typename T, vtkm::Id NumberOfComponents>
template <typename T, vtkm::IdComponent NumberOfComponents>
static void TestVecField()
{
const vtkm::Id nvals = 11;