nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a267d69
)
lib/core: Perfize reset in `FlatBuffer`
author
Lucas Bajolet
<r4pass@hotmail.com>
Mon, 9 May 2016 19:11:27 +0000
(15:11 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Mon, 9 May 2016 19:26:24 +0000
(15:26 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/core/text/flat.nit
patch
|
blob
|
history
diff --git
a/lib/core/text/flat.nit
b/lib/core/text/flat.nit
index
67ffacf
..
09dc9ad
100644
(file)
--- a/
lib/core/text/flat.nit
+++ b/
lib/core/text/flat.nit
@@
-924,7
+924,10
@@
class FlatBuffer
is_dirty = true
_bytelen = 0
_length = 0
- if written then reset
+ if written then
+ _capacity = 16
+ reset
+ end
end
redef fun empty do return new Buffer