diff examples/example-label/main.c @ 261:bfde372bf152

core: prefix utilities with util_
author David Demelier <markand@malikania.fr>
date Sun, 06 Dec 2020 23:06:34 +0100
parents 76afe639fd72
children 196264679079
line wrap: on
line diff
--- a/examples/example-label/main.c	Sun Dec 06 22:50:48 2020 +0100
+++ b/examples/example-label/main.c	Sun Dec 06 23:06:34 2020 +0100
@@ -16,6 +16,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <stddef.h>
+
 #include <core/core.h>
 #include <core/event.h>
 #include <core/game.h>
@@ -107,7 +109,7 @@
 	if (!window_open("Example - Label", W, H))
 		panic();
 
-	for (size_t i = 0; i < NELEM(table); ++i) {
+	for (size_t i = 0; i < UTIL_SIZE(table); ++i) {
 		struct label *l = &table[i].label;
 		unsigned int w, h;
 
@@ -150,7 +152,7 @@
 	painter_set_color(0x4f8fbaff);
 	painter_clear();
 
-	for (size_t i = 0; i < NELEM(table); ++i)
+	for (size_t i = 0; i < UTIL_SIZE(table); ++i)
 		label_draw(&table[i].label);
 
 	label_draw(&mlabel);