Skip to content

Commit

Permalink
fix simplecv Mat templated ptr (#5241)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Dec 21, 2023
1 parent c41aa2f commit d30af29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simpleocv.h
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ struct NCNN_EXPORT Mat
template<typename _Tp>
const _Tp* ptr(int y) const
{
return (const _Tp*)data + y * cols * c;
return (const _Tp*)(data + y * cols * c);
}

template<typename _Tp>
_Tp* ptr(int y)
{
return (_Tp*)data + y * cols * c;
return (_Tp*)(data + y * cols * c);
}

// roi
Expand Down

0 comments on commit d30af29

Please sign in to comment.