diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-19 12:32:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 12:32:41 +0200 |
commit | 1db45a9c1fd68e57611829a9363212a39f3c55d6 (patch) | |
tree | 512daeff103353e06d8c82deaad4d5040b99d468 /src/nvim/map.c | |
parent | 2de5cddeb197502c8b3ecf5e7eb1ac929cc2307f (diff) | |
parent | 8da986ea877b07a5eb117446f410f2a7fc8cd9cb (diff) | |
download | rneovim-1db45a9c1fd68e57611829a9363212a39f3c55d6.tar.gz rneovim-1db45a9c1fd68e57611829a9363212a39f3c55d6.tar.bz2 rneovim-1db45a9c1fd68e57611829a9363212a39f3c55d6.zip |
Merge pull request #25214 from bfredl/glyphcache
refactor(grid): change schar_T representation to be more compact
Diffstat (limited to 'src/nvim/map.c')
-rw-r--r-- | src/nvim/map.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/nvim/map.c b/src/nvim/map.c index e1d0646083..54f1969df8 100644 --- a/src/nvim/map.c +++ b/src/nvim/map.c @@ -47,25 +47,6 @@ static inline uint32_t hash_cstr_t(const char *s) #define equal_cstr_t strequal -// when used as a key, String doesn't need to be NUL terminated, -// and can also contain embedded NUL:s as part of the data. -static inline uint32_t hash_String(String s) -{ - uint32_t h = 0; - for (size_t i = 0; i < s.size; i++) { - h = (h << 5) - h + (uint8_t)s.data[i]; - } - return h; -} - -static inline bool equal_String(String a, String b) -{ - if (a.size != b.size) { - return false; - } - return memcmp(a.data, b.data, a.size) == 0; -} - static inline uint32_t hash_HlEntry(HlEntry ae) { const uint8_t *data = (const uint8_t *)&ae; |