From 774ef945e60afe7d74f48ef2d58d566b029fb389 Mon Sep 17 00:00:00 2001 From: Oliver Charles Date: Mon, 25 Jan 2021 08:55:20 +0000 Subject: [PATCH] Fixes for DearImGui.Context --- src/DearImGui/Context.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DearImGui/Context.hs b/src/DearImGui/Context.hs index e39539c..01efaad 100644 --- a/src/DearImGui/Context.hs +++ b/src/DearImGui/Context.hs @@ -10,7 +10,7 @@ import qualified Data.Map.Strict as Map import Foreign -data ImVec4 = ImVec4 { x, y, z, w :: {-# unpack #-} Float } +data ImVec4 = ImVec4 { x, y, z, w :: {-# unpack #-} !Float } instance Storable ImVec4 where @@ -25,7 +25,7 @@ instance Storable ImVec4 where poke (castPtr ptr `plusPtr` (sizeOf x * 3)) w peek ptr = do - x <- peek (castPtr ptr `plusPtr` ) + x <- peek (castPtr ptr ) y <- peek (castPtr ptr `plusPtr` (sizeOf x * 1)) z <- peek (castPtr ptr `plusPtr` (sizeOf x * 2)) w <- peek (castPtr ptr `plusPtr` (sizeOf x * 3)) @@ -37,4 +37,4 @@ imguiContext = mempty { ctxTypesTable = Map.fromList [ ( TypeName "ImVec4", [t| ImVec4 |] ) ] - } + }