diff options
author | Keith Rothman <537074+litghost@users.noreply.github.com> | 2021-02-05 09:32:30 -0800 |
---|---|---|
committer | Keith Rothman <537074+litghost@users.noreply.github.com> | 2021-02-05 10:12:13 -0800 |
commit | a0ee42833b774483f9b2fc35109f7ec948dbdc9b (patch) | |
tree | 8fd298bbe7714c9d553362b291064f3e4329180f /common | |
parent | 9557047e5ee6c89aca7816517d8b328d2a13b8b7 (diff) | |
download | nextpnr-a0ee42833b774483f9b2fc35109f7ec948dbdc9b.tar.gz nextpnr-a0ee42833b774483f9b2fc35109f7ec948dbdc9b.tar.bz2 nextpnr-a0ee42833b774483f9b2fc35109f7ec948dbdc9b.zip |
Add RelSlice::ssize and use it when comparing with signed ints.
Signed-off-by: Keith Rothman <537074+litghost@users.noreply.github.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/relptr.h | 1 |
1 files changed, 1 insertions, 0 deletions
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 <typename T> 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()); } |