From 7177a737f5feee60a9775560f2a953bae26bd96a Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 21 May 2022 22:42:03 +0200 Subject: Fix compilation on 32-bit architectures --- src/types/color.nim | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/types/color.nim b/src/types/color.nim index 3f8307de..cb3b2f3f 100644 --- a/src/types/color.nim +++ b/src/types/color.nim @@ -1,8 +1,7 @@ -# TODO both should probably be distinct int32 type - RGBColor* = distinct int + RGBColor* = distinct uint32 - RGBAColor* = distinct int + RGBAColor* = distinct uint32 CellColor* = object case rgb*: bool @@ -52,7 +51,7 @@ func rgba*(r, g, b, a: int): RGBAColor = return RGBAColor((a shl 24) or (r shl 16) or (g shl 8) or b) converter toRGBColor*(i: RGBAColor): RGBColor = - return RGBColor(int(i) and 0xFFFFFF) + return RGBColor(uint32(i) and 0xFFFFFFu32) converter toRGBAColor*(i: RGBColor): RGBAColor = - return RGBAColor(int(i) or 0xFF000000) + return RGBAColor(uint32(i) or 0xFF000000u32) -- cgit 1.4.1-2-gfad0