Skip to content

Commit

Permalink
fix to unblock nim-lang/Nim#14869
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jul 1, 2020
1 parent 9bbc3b8 commit c4764c2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ginger.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export types, backends, macroUtils

from os import splitFile

proc byLent[T](a: T): lent T {.inline.} = a # pending https://github.com/nim-lang/Nim/pull/14875

# TODO: think about renaming `Coord1D` to someting like Unit?

# TODO: implement some more units so that we can use it to define
Expand Down Expand Up @@ -1355,14 +1357,14 @@ func updateDataScale(view: Viewport, obj: var GraphObject) =
of goLabel, goText, goTickLabel:
view.updateScale(obj.txtPos)
of goGrid:
obj.gdXPos.applyIt(view.updateScale(it))
obj.gdYPos.applyIt(view.updateScale(it))
obj.gdXPos.applyIt(view.updateScale(it.byLent))
obj.gdYPos.applyIt(view.updateScale(it.byLent))
of goTick:
view.updateScale(obj.tkPos)
of goPoint:
view.updateScale(obj.ptPos)
of goPolyLine:
obj.plPos.applyIt(view.updateScale(it))
obj.plPos.applyIt(view.updateScale(it.byLent))
of goRect:
view.updateScale(obj.reOrigin)
of goRaster:
Expand Down

0 comments on commit c4764c2

Please sign in to comment.