[vlc-devel] [PATCH 1/2] vlc_arrays: Return dict hash as size_t

Hugo Beauzée-Luyssen hugo at beauzee.fr
Fri Dec 4 10:31:31 CET 2020


As they are used as index, this type is more appropriate
---
 include/vlc_arrays.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_arrays.h b/include/vlc_arrays.h
index b558422f93..a7469359bb 100644
--- a/include/vlc_arrays.h
+++ b/include/vlc_arrays.h
@@ -381,9 +381,9 @@ static inline void vlc_array_remove( vlc_array_t *ar, size_t idx )
  * fast and not suck too much. This one is pretty fast and did 0 collisions
  * in wenglish's dictionary.
  */
-static inline uint64_t DictHash( const char *psz_string, int hashsize )
+static inline size_t DictHash( const char *psz_string, int hashsize )
 {
-    uint64_t i_hash = 0;
+    size_t i_hash = 0;
     if( psz_string )
     {
         while( *psz_string )
-- 
2.29.2



More information about the vlc-devel mailing list