make AscText immutable when drawing

Sun, 21 Jan 2024 13:34:49 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 21 Jan 2024 13:34:49 +0100
changeset 26
139dac8ef9ee
parent 25
601b3f4e17a2
child 27
4ccf4703999e

make AscText immutable when drawing

src/ascension/text.h file | annotate | diff | comparison | revisions
src/text.c file | annotate | diff | comparison | revisions
--- a/src/ascension/text.h	Sun Jan 21 13:31:51 2024 +0100
+++ b/src/ascension/text.h	Sun Jan 21 13:34:49 2024 +0100
@@ -78,7 +78,7 @@
  *
  * @param node the text node
  */
-void asc_text_draw(AscText *node);
+void asc_text_draw(AscText const *node);
 
 /**
  * Releases all the memory of this node.
--- a/src/text.c	Sun Jan 21 13:31:51 2024 +0100
+++ b/src/text.c	Sun Jan 21 13:34:49 2024 +0100
@@ -93,7 +93,7 @@
     SDL_FreeSurface(surface);
 }
 
-void asc_text_draw(AscText *node) {
+void asc_text_draw(AscText const *node) {
     if (node->color.alpha == 0 || node->hidden) {
         return;
     }

mercurial