From 2bcea52b81037eb0950b68b58a159952f0ab738a Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Tue, 8 Dec 2015 13:22:20 -0500 Subject: [PATCH] lib/core: Have `is_empty` work with `_bytelen` instead of `length` for speed Signed-off-by: Lucas Bajolet --- lib/core/text/ropes.nit | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/core/text/ropes.nit b/lib/core/text/ropes.nit index 84afa5b..1a91e00 100644 --- a/lib/core/text/ropes.nit +++ b/lib/core/text/ropes.nit @@ -115,6 +115,8 @@ private class Concat _bytelen = l.bytelen + r.bytelen end + redef fun is_empty do return _bytelen == 0 + redef fun output do _left.output _right.output -- 1.7.9.5