Compare commits

..

2 Commits

Author SHA1 Message Date
bangbangsheshotmedown
49f2175980
Merge ea3e29be5c into 40ae6d8894 2025-02-01 11:58:16 +01:00
Harrison Lambeth
40ae6d8894
Fix int conversion errors in msvc (#242)
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Has been cancelled
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Has been cancelled
2025-01-30 15:46:37 +13:00

2
clay.h
View File

@ -990,7 +990,7 @@ uint32_t Clay__HashTextWithConfig(Clay_String *text, Clay_TextElementConfig *con
if (config->hashStringContents) { if (config->hashStringContents) {
uint32_t maxLengthToHash = CLAY__MIN(text->length, 256); uint32_t maxLengthToHash = CLAY__MIN(text->length, 256);
for (int i = 0; i < maxLengthToHash; i++) { for (uint32_t i = 0; i < maxLengthToHash; i++) {
hash += text->chars[i]; hash += text->chars[i];
hash += (hash << 10); hash += (hash << 10);
hash ^= (hash >> 6); hash ^= (hash >> 6);