Merge branch 'iterator_operator_square_bracket_corrected' into 'master'
Make sure we use ptrdiff_t for index into arrays. This is a requirement since you can use negative indices into arrays. See merge request !41
This commit is contained in:
commit
9ef7fa9b3a
@ -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) );
|
||||
|
Loading…
Reference in New Issue
Block a user