nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12c1403
)
lib/core: Stop allocating 1 byte more when initializing a `FlatBuffer` with capacity
author
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 3 May 2016 03:27:28 +0000
(23:27 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Tue, 3 May 2016 03:27:28 +0000
(23:27 -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
c3a2fed
..
45ad144
100644
(file)
--- a/
lib/core/text/flat.nit
+++ b/
lib/core/text/flat.nit
@@
-1006,7
+1006,7
@@
class FlatBuffer
init with_capacity(cap: Int)
do
assert cap >= 0
- _items = new NativeString(cap + 1)
+ _items = new NativeString(cap)
capacity = cap
_bytelen = 0
end