mirror of
https://github.com/nicbarker/clay.git
synced 2025-04-24 07:08:03 +00:00
Compare commits
No commits in common. "966d9cc5f466eb508752a0590f26a7f9b586943b" and "d80da4c7001d52f0427ce660ca3d711baf8378be" have entirely different histories.
966d9cc5f4
...
d80da4c700
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4
clay.h
4
clay.h
@ -98,7 +98,7 @@
|
|||||||
// Note: If an error led you here, it's because CLAY_STRING can only be used with string literals, i.e. CLAY_STRING("SomeString") and not CLAY_STRING(yourString)
|
// Note: If an error led you here, it's because CLAY_STRING can only be used with string literals, i.e. CLAY_STRING("SomeString") and not CLAY_STRING(yourString)
|
||||||
#define CLAY_STRING(string) (CLAY__INIT(Clay_String) { .isStaticallyAllocated = true, .length = CLAY__STRING_LENGTH(CLAY__ENSURE_STRING_LITERAL(string)), .chars = (string) })
|
#define CLAY_STRING(string) (CLAY__INIT(Clay_String) { .isStaticallyAllocated = true, .length = CLAY__STRING_LENGTH(CLAY__ENSURE_STRING_LITERAL(string)), .chars = (string) })
|
||||||
|
|
||||||
#define CLAY_STRING_CONST(string) { .isStaticallyAllocated = true, .length = CLAY__STRING_LENGTH(CLAY__ENSURE_STRING_LITERAL(string)), .chars = (string) }
|
#define CLAY_STRING_CONST(string) { .length = CLAY__STRING_LENGTH(CLAY__ENSURE_STRING_LITERAL(string)), .chars = (string) }
|
||||||
|
|
||||||
static uint8_t CLAY__ELEMENT_DEFINITION_LATCH;
|
static uint8_t CLAY__ELEMENT_DEFINITION_LATCH;
|
||||||
|
|
||||||
@ -1470,7 +1470,7 @@ uint64_t Clay__HashData(const uint8_t* data, size_t length) {
|
|||||||
|
|
||||||
uint32_t Clay__HashStringContentsWithConfig(Clay_String *text, Clay_TextElementConfig *config) {
|
uint32_t Clay__HashStringContentsWithConfig(Clay_String *text, Clay_TextElementConfig *config) {
|
||||||
uint32_t hash = 0;
|
uint32_t hash = 0;
|
||||||
if (text->isStaticallyAllocated) {
|
if (false) {
|
||||||
hash += (uintptr_t)text->chars;
|
hash += (uintptr_t)text->chars;
|
||||||
hash += (hash << 10);
|
hash += (hash << 10);
|
||||||
hash ^= (hash >> 6);
|
hash ^= (hash >> 6);
|
||||||
|
Loading…
Reference in New Issue
Block a user