summaryrefslogtreecommitdiffstats
path: root/libdimension/canvas.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-24 13:19:38 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-24 13:19:38 -0500
commita8181915a4aac7a37bdd62705e2eac1067eb1904 (patch)
tree4e90ce29b5fad0d34f268e5ac9d247c3ef034a3f /libdimension/canvas.c
parentbabba43cd4d1b9c92a569f19acbe17e429193b01 (diff)
downloaddimension-a8181915a4aac7a37bdd62705e2eac1067eb1904.tar.xz
Use macros to initialize refcounts.
Diffstat (limited to 'libdimension/canvas.c')
-rw-r--r--libdimension/canvas.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c
index eeeb66b..2bcc502 100644
--- a/libdimension/canvas.c
+++ b/libdimension/canvas.c
@@ -31,13 +31,11 @@ dmnsn_canvas *
dmnsn_new_canvas(size_t width, size_t height)
{
dmnsn_canvas *canvas = dmnsn_malloc(sizeof(dmnsn_canvas));
-
canvas->width = width;
canvas->height = height;
canvas->optimizers = dmnsn_new_array(sizeof(dmnsn_canvas_optimizer));
canvas->pixels = dmnsn_malloc(sizeof(dmnsn_tcolor)*width*height);
- canvas->refcount = 1;
-
+ DMNSN_REFCOUNT_INIT(canvas);
return canvas;
}