nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b20ae02
)
lib/core: Have `is_empty` work with `_bytelen` instead of `length` for speed
author
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 8 Dec 2015 18:22:20 +0000
(13:22 -0500)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 29 Dec 2015 04:49:28 +0000
(23:49 -0500)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/core/text/ropes.nit
patch
|
blob
|
history
diff --git
a/lib/core/text/ropes.nit
b/lib/core/text/ropes.nit
index
84afa5b
..
1a91e00
100644
(file)
--- 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