C++ init order fix
Some checks failed
CMake on multiple platforms / build (Release, cl, cl, windows-latest) (push) Waiting to run
CMake on multiple platforms / build (Release, clang, clang++, ubuntu-latest) (push) Failing after 13s
CMake on multiple platforms / build (Release, gcc, g++, ubuntu-latest) (push) Failing after 11s

This commit is contained in:
Nic Barker 2025-01-10 14:36:24 +13:00
parent 209f30dd56
commit b4452d080c

2
clay.h
View File

@ -3707,8 +3707,8 @@ Clay_Context* Clay_Initialize(Clay_Arena arena, Clay_Dimensions layoutDimensions
.maxElementCount = oldContext ? oldContext->maxElementCount : Clay__defaultMaxElementCount, .maxElementCount = oldContext ? oldContext->maxElementCount : Clay__defaultMaxElementCount,
.maxMeasureTextCacheWordCount = oldContext ? oldContext->maxMeasureTextCacheWordCount : Clay__defaultMaxElementCount * 2, .maxMeasureTextCacheWordCount = oldContext ? oldContext->maxMeasureTextCacheWordCount : Clay__defaultMaxElementCount * 2,
.errorHandler = errorHandler.errorHandlerFunction ? errorHandler : CLAY__INIT(Clay_ErrorHandler) { Clay__ErrorHandlerFunctionDefault }, .errorHandler = errorHandler.errorHandlerFunction ? errorHandler : CLAY__INIT(Clay_ErrorHandler) { Clay__ErrorHandlerFunctionDefault },
.internalArena = arena,
.layoutDimensions = layoutDimensions, .layoutDimensions = layoutDimensions,
.internalArena = arena,
}; };
Clay_SetCurrentContext(context); Clay_SetCurrentContext(context);
Clay__InitializePersistentMemory(context); Clay__InitializePersistentMemory(context);