From d9e121f4c73e34ec1f9b7dd6dac19a11c1cd1ee1 Mon Sep 17 00:00:00 2001 From: Fabian Giesen Date: Mon, 8 Dec 2014 19:53:12 -0800 Subject: [PATCH] stb_rect_pack: Fix implicit conversion warnings. --- stb_rect_pack.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stb_rect_pack.h b/stb_rect_pack.h index c30654f..74eb61d 100644 --- a/stb_rect_pack.h +++ b/stb_rect_pack.h @@ -231,7 +231,7 @@ STBRP_DEF void stbrp_init_target(stbrp_context *context, int width, int height, context->extra[0].x = 0; context->extra[0].y = 0; context->extra[0].next = &context->extra[1]; - context->extra[1].x = width; + context->extra[1].x = (stbrp_coord) width; #ifdef STBRP_LARGE_RECTS context->extra[1].y = (1<<30); #else @@ -406,8 +406,8 @@ static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, i // on success, create new node node = context->free_head; - node->x = res.x; - node->y = res.y + height; + node->x = (stbrp_coord) res.x; + node->y = (stbrp_coord) (res.y + height); context->free_head = node->next; @@ -439,7 +439,7 @@ static stbrp__findresult stbrp__skyline_pack_rectangle(stbrp_context *context, i node->next = cur; if (cur->x < res.x + width) - cur->x = res.x+width; + cur->x = (stbrp_coord) (res.x + width); #ifdef _DEBUG cur = context->active_head;