From c4c2132ac67a457cc7f55cc8a6d5e099747dbdb8 Mon Sep 17 00:00:00 2001 From: Sergey Semushin Date: Tue, 16 Jul 2019 11:17:48 +0300 Subject: [PATCH] Cast pointer to ptrdiff_t to make code less undefined for 64-bit. --- Source/list.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/list.h b/Source/list.h index c9b2f2847..154f9beca 100644 --- a/Source/list.h +++ b/Source/list.h @@ -186,14 +186,14 @@ public: T *Next() { - if ((int)m_nextNode <= 0) + if ((ptrdiff_t)m_nextNode <= 0) return NULL; return m_nextNode; } TLink *NextLink(size_t offset = -1) { - if ((int)m_nextNode <= 0) + if ((ptrdiff_t)m_nextNode <= 0) return (TLink *)~((size_t)m_nextNode); if ((int)offset < 0) {