From 7b54183f31585ea62dc221b040ac48a8bde3e518 Mon Sep 17 00:00:00 2001 From: Alberto Torres Date: Tue, 10 Sep 2024 01:00:11 +0200 Subject: [PATCH] Fix some mysterious warnings when using `enqueue`. --- src/types.nim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/types.nim b/src/types.nim index 10ac33a..566811d 100644 --- a/src/types.nim +++ b/src/types.nim @@ -898,14 +898,15 @@ type BlendLoader* = ref object of Loader (string, seq[Varying], OrderedTable[string, string], OrderedTable[string, TexturePixels])] ## private resource*: LoadableResource -template enqueue*(renderer: RenderManager, fun: proc()) = +template enqueue*(renderer: RenderManager, fun: untyped) = ## Run a proc after the renderer has been initialized. ## ## If it was already initialized, it runs it immediately. + let f = fun if renderer.initialized: - fun() + f() else: - renderer.queue.add fun + renderer.queue.add f when not defined(release): from sugar import dump