Fix some mysterious warnings when using enqueue
.
This commit is contained in:
parent
67f009c157
commit
7b54183f31
|
@ -898,14 +898,15 @@ type BlendLoader* = ref object of Loader
|
||||||
(string, seq[Varying], OrderedTable[string, string], OrderedTable[string, TexturePixels])] ## private
|
(string, seq[Varying], OrderedTable[string, string], OrderedTable[string, TexturePixels])] ## private
|
||||||
resource*: LoadableResource
|
resource*: LoadableResource
|
||||||
|
|
||||||
template enqueue*(renderer: RenderManager, fun: proc()) =
|
template enqueue*(renderer: RenderManager, fun: untyped) =
|
||||||
## Run a proc after the renderer has been initialized.
|
## Run a proc after the renderer has been initialized.
|
||||||
##
|
##
|
||||||
## If it was already initialized, it runs it immediately.
|
## If it was already initialized, it runs it immediately.
|
||||||
|
let f = fun
|
||||||
if renderer.initialized:
|
if renderer.initialized:
|
||||||
fun()
|
f()
|
||||||
else:
|
else:
|
||||||
renderer.queue.add fun
|
renderer.queue.add f
|
||||||
|
|
||||||
when not defined(release):
|
when not defined(release):
|
||||||
from sugar import dump
|
from sugar import dump
|
||||||
|
|
Loading…
Reference in a new issue