From 6d7535f8424ebcfe41fdfaa5c84c3039a433f973 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Wed, 13 Feb 2013 13:25:57 +0000 Subject: [PATCH] base: work around an annoying GCC warning we very well know about. --- src/lol/base/array.h | 2 +- src/lol/base/string.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lol/base/array.h b/src/lol/base/array.h index 998b5150..99f7ef42 100644 --- a/src/lol/base/array.h +++ b/src/lol/base/array.h @@ -119,7 +119,7 @@ public: /* Allow array[0] even if size is zero so that people can * always use &array[0] to get a pointer to the data. */ ASSERT(n >= 0); - ASSERT(n < m_count || (!n && !m_count)); + ASSERT((unsigned)n < (unsigned)m_count || (!n && !m_count)); return m_data[n]; } diff --git a/src/lol/base/string.h b/src/lol/base/string.h index 8872f070..2e404a06 100644 --- a/src/lol/base/string.h +++ b/src/lol/base/string.h @@ -67,7 +67,7 @@ public: /* Allow n == Count() because we might have reasonable reasons * to access that hidden null character. */ ASSERT(n >= 0); - ASSERT(n <= Count()); + ASSERT((unsigned)n <= (unsigned)Count()); return ((Super &)*this)[n]; }