From 0f614c03beeede661a18ad7be491f21e4c07c248 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Wed, 20 Apr 2016 01:51:55 -0400 Subject: [PATCH] core: fix warnings in ropes Signed-off-by: Alexandre Terrasa --- lib/core/text/ropes.nit | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/core/text/ropes.nit b/lib/core/text/ropes.nit index 0bf97b8..f57b33d 100644 --- a/lib/core/text/ropes.nit +++ b/lib/core/text/ropes.nit @@ -821,7 +821,7 @@ private class ReverseRopeSubstrings redef fun next do if pos < 0 then return var curr = iter.prev - var currit = curr.node + var currit = curr.as(not null).node while curr != null do currit = curr.node if not currit isa Concat then @@ -928,14 +928,14 @@ private class RopeSubstrings redef fun next do pos += str.length if pos > max then return - var it = iter.prev + var it = iter.prev.as(not null) var rnod = it.node loop if not rnod isa Concat then it.ldone = true it.rdone = true str = rnod.as(FlatString) - iter = it.as(not null) + iter = it break end if not it.ldone then @@ -947,7 +947,7 @@ private class RopeSubstrings rnod = rnod._right it = new RopeCharIteratorPiece(rnod, false, false, it) else - it = it.prev + it = it.prev.as(not null) rnod = it.node continue end -- 1.7.9.5