Respect const qualifier

This commit is contained in:
2023-12-29 09:43:46 +01:00
parent e7a0f91c36
commit 5aba8d18c6
2 changed files with 3 additions and 2 deletions

View File

@@ -601,7 +601,7 @@ void bzUISetTextStyle(BzUI *ui, BzUINode *node, BzUITextStyle style) {
BZ_ASSERT(ui && node); BZ_ASSERT(ui && node);
node->flags |= BZ_UI_DRAW_TEXT; node->flags |= BZ_UI_DRAW_TEXT;
BZ_ASSERT(style.text); BZ_ASSERT(style.text);
char *str = style.text; const char *str = style.text;
char prev = '\0'; char prev = '\0';
while (*str) { while (*str) {
if (*str == '#' && prev == '#') { if (*str == '#' && prev == '#') {
@@ -657,6 +657,7 @@ void bzUISetParentLayout(BzUI *ui, BzUILayout layout) {
} }
BzUIInteraction bzUIGetInteraction(BzUI *ui, BzUINode *node) { BzUIInteraction bzUIGetInteraction(BzUI *ui, BzUINode *node) {
BZ_UNUSED(ui);
BZ_ASSERT(node); BZ_ASSERT(node);
return node->interaction; return node->interaction;
} }

View File

@@ -126,7 +126,7 @@ typedef struct BzUIBorderStyle {
} BzUIBorderStyle; } BzUIBorderStyle;
typedef struct BzUITextStyle { typedef struct BzUITextStyle {
char *text; const char *text;
Font font; Font font;
f32 fontSize; f32 fontSize;
f32 fontSpacing; f32 fontSpacing;