Compare commits

...

5 Commits

Author SHA1 Message Date
Nic Barker
70a8a65518
Merge f7bdffcb8a into 40ae6d8894 2025-02-02 02:06:19 +00:00
Nic Barker
f7bdffcb8a GCC issues 2025-02-02 15:06:13 +13:00
Nic Barker
e39b1b8cb1 unused variable 2025-02-02 14:52:45 +13:00
Nic Barker
dabc78419f Github workflow update 2025-02-02 14:48:38 +13: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
3 changed files with 6 additions and 5 deletions

View File

@ -63,6 +63,7 @@ jobs:
- name: Install Dependencies
if: runner.os == 'Linux'
run: |
DEBIAN_FRONTEND=noninteractive sudo apt-get update -y
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y git
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y libwayland-dev
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y pkg-config

6
clay.h
View File

@ -1058,7 +1058,7 @@ uint32_t Clay__HashTextWithConfig(Clay_String *text, Clay_TextElementConfig *con
if (config->hashStringContents) {
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 += (hash << 10);
hash ^= (hash >> 6);
@ -1541,7 +1541,6 @@ void Clay__ConfigureOpenElement(const Clay_ElementDeclaration declaration) {
uint8_t* decData = (uint8_t*)&declaration;
for (int32_t i = 0; i < context->declarationPaddingMask.length; i++) {
int offset = context->declarationPaddingMask.internalArray[i];
*(decData + context->declarationPaddingMask.internalArray[i]) = 0;
}
@ -3294,11 +3293,12 @@ void Clay_SetPointerState(Clay_Vector2 position, bool isPointerDown) {
}
}
void Clay__PoisonStack(Clay_Context* context) {
uint8_t Clay__PoisonStack(Clay_Context* context) {
uint8_t stackmem[1024];
for (int i = 0; i < 1024; i++) {
stackmem[i] = 0xce;
}
return stackmem[0];
}
void Clay__CalculateDeclarationPaddingMask(const Clay_ElementDeclaration dec, Clay_Context* context) {

View File

@ -5,5 +5,5 @@ set(CMAKE_C_STANDARD 99)
add_executable(clay_official_website main.c)
target_compile_options(clay_official_website PUBLIC -Wall -Werror -Wno-unknown-pragmas -Wno-error=missing-braces)
target_compile_options(clay_official_website PUBLIC)
target_include_directories(clay_official_website PUBLIC .)