From 9522a0b7c16414fce2103cf58bfdd63aaf0cb01b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 3 Nov 2022 14:58:32 -0400 Subject: DRTVWR-575: Fix llcommon assumptions that size_t fits in 4 bytes. It's a little distressing how often we have historically coded S32 or U32 to pass a length or index. There are more such assumptions in other viewer subdirectories, but this is a start. --- indra/llcommon/llkeybind.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llkeybind.h') diff --git a/indra/llcommon/llkeybind.h b/indra/llcommon/llkeybind.h index c6b4bd970f..f63ad1d64e 100644 --- a/indra/llcommon/llkeybind.h +++ b/indra/llcommon/llkeybind.h @@ -95,7 +95,7 @@ public: void clear() { mData.clear(); } // if there any empty LLKeyData in the end of the array, remove them void trimEmpty(); - U32 getDataCount(); + size_t getDataCount(); private: typedef std::vector data_vector_t; -- cgit v1.2.3 From 8f6ffd489df9d6346e04070ad8209f2432ef3416 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 6 Dec 2022 13:04:35 -0500 Subject: DRTVWR-575: Introduce LLKeyBind::endNonEmpty() and use it to replace dubious loops in asLLSD() and trimEmpty(). --- indra/llcommon/llkeybind.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llcommon/llkeybind.h') diff --git a/indra/llcommon/llkeybind.h b/indra/llcommon/llkeybind.h index f63ad1d64e..488f509411 100644 --- a/indra/llcommon/llkeybind.h +++ b/indra/llcommon/llkeybind.h @@ -100,6 +100,8 @@ public: private: typedef std::vector data_vector_t; data_vector_t mData; + + data_vector_t::const_iterator endNonEmpty() const; }; -- cgit v1.2.3