From a0ee42833b774483f9b2fc35109f7ec948dbdc9b Mon Sep 17 00:00:00 2001 From: Keith Rothman <537074+litghost@users.noreply.github.com> Date: Fri, 5 Feb 2021 09:32:30 -0800 Subject: Add RelSlice::ssize and use it when comparing with signed ints. Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com> --- common/relptr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'common') diff --git a/common/relptr.h b/common/relptr.h index 035d61fb..d45912ab 100644 --- a/common/relptr.h +++ b/common/relptr.h @@ -32,6 +32,7 @@ NPNR_PACKED_STRUCT(template struct RelSlice { const T *end() const { return get() + length; } const size_t size() const { return length; } + const ptrdiff_t ssize() const { return length; } const T &operator*() const { return *(get()); } -- cgit v1.2.3