[Core] use CLAY__DEFAULT_STRUCT macro

This commit is contained in:
gmasil 2025-05-13 15:26:13 +02:00
parent 5c67b957bb
commit 807bc25ae7
No known key found for this signature in database
GPG key ID: 135FC0B941F3ECC7

4
clay.h
View file

@ -3900,7 +3900,7 @@ CLAY_WASM_EXPORT("Clay_GetScrollOffset")
Clay_Vector2 Clay_GetScrollOffset(void) { Clay_Vector2 Clay_GetScrollOffset(void) {
Clay_Context* context = Clay_GetCurrentContext(); Clay_Context* context = Clay_GetCurrentContext();
if (context->booleanWarnings.maxElementsExceeded) { if (context->booleanWarnings.maxElementsExceeded) {
return CLAY__INIT(Clay_Vector2){0}; return CLAY__INIT(Clay_Vector2) CLAY__DEFAULT_STRUCT;
} }
Clay_LayoutElement *openLayoutElement = Clay__GetOpenLayoutElement(); Clay_LayoutElement *openLayoutElement = Clay__GetOpenLayoutElement();
// If the element has no id attached at this point, we need to generate one // If the element has no id attached at this point, we need to generate one
@ -3913,7 +3913,7 @@ Clay_Vector2 Clay_GetScrollOffset(void) {
return mapping->scrollPosition; return mapping->scrollPosition;
} }
} }
return CLAY__INIT(Clay_Vector2){0}; return CLAY__INIT(Clay_Vector2) CLAY__DEFAULT_STRUCT;
} }
CLAY_WASM_EXPORT("Clay_UpdateScrollContainers") CLAY_WASM_EXPORT("Clay_UpdateScrollContainers")