summaryrefslogtreecommitdiff
path: root/src/ptrmath.nim
diff options
context:
space:
mode:
authorkitty piapiac <kcp@bsd.computer>2020-07-30 09:29:57 -0700
committerkitty piapiac <kcp@bsd.computer>2020-07-30 09:29:57 -0700
commitb1745b4d2e449e07aa2b08a9def6894ec6d0fe53 (patch)
treef23af07ff003a6a2a32acfd093d57891fb7c1628 /src/ptrmath.nim
parent287993851c79556e1d65496aa09a2ba55efc0564 (diff)
(。ヘ°) stop using XQueryTree
sequence of windows on the window manager
Diffstat (limited to 'src/ptrmath.nim')
-rw-r--r--src/ptrmath.nim19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/ptrmath.nim b/src/ptrmath.nim
deleted file mode 100644
index 7de2fa6..0000000
--- a/src/ptrmath.nim
+++ /dev/null
@@ -1,19 +0,0 @@
-# from http://forum.nim-lang.org/t/1188#7366
-
-template `+`*[T](p: ptr T, off: int): ptr T =
- cast[ptr type(p[])](cast[ByteAddress](p) +% off * sizeof(p[]))
-
-template `+=`*[T](p: ptr T, off: int) =
- p = p + off
-
-template `-`*[T](p: ptr T, off: int): ptr T =
- cast[ptr type(p[])](cast[ByteAddress](p) -% off * sizeof(p[]))
-
-template `-=`*[T](p: ptr T, off: int) =
- p = p - off
-
-template `[]`*[T](p: ptr T, off: int): T =
- (p + off)[]
-
-template `[]=`*[T](p: ptr T, off: int, val: T) =
- (p + off)[] = val \ No newline at end of file