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
     1.1 --- a/src/ascension/text.h	Sun Jan 21 13:31:51 2024 +0100
     1.2 +++ b/src/ascension/text.h	Sun Jan 21 13:34:49 2024 +0100
     1.3 @@ -78,7 +78,7 @@
     1.4   *
     1.5   * @param node the text node
     1.6   */
     1.7 -void asc_text_draw(AscText *node);
     1.8 +void asc_text_draw(AscText const *node);
     1.9  
    1.10  /**
    1.11   * Releases all the memory of this node.
     2.1 --- a/src/text.c	Sun Jan 21 13:31:51 2024 +0100
     2.2 +++ b/src/text.c	Sun Jan 21 13:34:49 2024 +0100
     2.3 @@ -93,7 +93,7 @@
     2.4      SDL_FreeSurface(surface);
     2.5  }
     2.6  
     2.7 -void asc_text_draw(AscText *node) {
     2.8 +void asc_text_draw(AscText const *node) {
     2.9      if (node->color.alpha == 0 || node->hidden) {
    2.10          return;
    2.11      }

mercurial