summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-04-28 07:57:44 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-04-28 07:57:44 +0200
commit65c08212db7d2e8f778b0db43e831f5f3e86b8ce (patch)
tree7e678f4358dadc56cdcc04a366565ae11d100485 /lib
parentf697596faf1712753efb14220b8991566bd7267f (diff)
downloadNim-65c08212db7d2e8f778b0db43e831f5f3e86b8ce.tar.gz
system.nim: minor code cleanup
Diffstat (limited to 'lib')
-rw-r--r--lib/system/sysstr.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim
index e64e12fc7..9e7ee903f 100644
--- a/lib/system/sysstr.nim
+++ b/lib/system/sysstr.nim
@@ -101,9 +101,6 @@ proc cstrToNimstr(str: cstring): NimString {.compilerRtl.} =
   if str == nil: NimString(nil)
   else: toNimStr(str, str.len)
 
-template wasMoved(x: NimString): bool = false
-# (x.reserved and seqShallowFlag) != 0
-
 proc copyString(src: NimString): NimString {.compilerRtl.} =
   if src != nil:
     if (src.reserved and seqShallowFlag) != 0:
@@ -209,7 +206,7 @@ proc addChar(s: NimString, c: char): NimString =
 proc resizeString(dest: NimString, addlen: int): NimString {.compilerRtl.} =
   if dest == nil:
     result = rawNewStringNoInit(addlen)
-  elif dest.len + addlen <= dest.space and not wasMoved(dest):
+  elif dest.len + addlen <= dest.space:
     result = dest
   else: # slow path:
     var sp = max(resize(dest.space), dest.len + addlen)