Fix some mysterious warnings when using enqueue.

This commit is contained in:
Alberto Torres 2024-09-10 01:00:11 +02:00
parent 67f009c157
commit 7b54183f31

View file

@ -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