Make sure we use ptrdiff_t for index into arrays.

This is a requirement since you can use negative indices into arrays.
This commit is contained in:
Robert Maynard 2015-06-16 09:52:23 -04:00
parent 925d6865d2
commit 726c914ee5
2 changed files with 2 additions and 2 deletions

@ -107,7 +107,7 @@ public:
VTKM_CONT_EXPORT
detail::IteratorFromArrayPortalValue<ArrayPortalType>
operator[](std::size_t idx) const
operator[](std::ptrdiff_t idx) const //NEEDS to be signed
{
return detail::IteratorFromArrayPortalValue<ArrayPortalType>(this->Portal,
this->Index + static_cast<vtkm::Id>(idx) );

@ -113,7 +113,7 @@ public:
VTKM_EXEC_EXPORT
PortalValue<ArrayPortalType>
operator[](std::size_t idx) const
operator[](std::ptrdiff_t idx) const //NEEDS to be signed
{
return PortalValue<ArrayPortalType>(this->Portal,
this->Index + static_cast<vtkm::Id>(idx) );