mirror of
https://github.com/nicbarker/clay.git
synced 2025-05-13 05:48:04 +00:00
Compare commits
3 Commits
ae846b0a87
...
60c582590b
Author | SHA1 | Date | |
---|---|---|---|
|
60c582590b | ||
|
40ae6d8894 | ||
|
c68a3ee136 |
7
clay.h
7
clay.h
@ -14,6 +14,11 @@
|
|||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef __JETBRAINS_IDE__
|
||||||
|
// Help jetbrains IDEs like CLion and Rider with intellisense & debugging
|
||||||
|
#define CLAY_IMPLEMENTATION
|
||||||
|
#endif
|
||||||
|
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
// HEADER DECLARATIONS ---------------------
|
// HEADER DECLARATIONS ---------------------
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
@ -990,7 +995,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);
|
||||||
|
Loading…
Reference in New Issue
Block a user