diff options
author | Jacek Sieka <arnetheduck@gmail.com> | 2015-04-03 23:30:42 +0800 |
---|---|---|
committer | Jacek Sieka <arnetheduck@gmail.com> | 2015-04-03 23:30:42 +0800 |
commit | 0f131b9f46aed4bd077c2c04e63dc0cacc348930 (patch) | |
tree | 231a46b211b267403eaf26c788e52c0b23dc54f6 /compiler | |
parent | d7a42641ab66c3f785f179fe86846c3c92cb9739 (diff) | |
download | Nim-0f131b9f46aed4bd077c2c04e63dc0cacc348930.tar.gz |
ropes: remove more unnecessary checks
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ropes.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ropes.nim b/compiler/ropes.nim index 160b1a4c6..0da5a06ce 100644 --- a/compiler/ropes.nim +++ b/compiler/ropes.nim @@ -284,11 +284,11 @@ proc `%`*(frmt: TFormatStr, args: openArray[Rope]): Rope = of '{': inc(i) var j = 0 - while i < length and frmt[i] in {'0'..'9'}: + while frmt[i] in {'0'..'9'}: j = j * 10 + ord(frmt[i]) - ord('0') inc(i) num = j - if i < length and frmt[i] == '}': inc(i) + if frmt[i] == '}': inc(i) else: errorHandler(rInvalidFormatStr, $(frmt[i])) if j > high(args) + 1: |