nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nit: Added link to `CONTRIBUTING.md` from the README
[nit.git]
/
lib
/
core
/
collection
/
array.nit
diff --git
a/lib/core/collection/array.nit
b/lib/core/collection/array.nit
index
d196333
..
79e7a70
100644
(file)
--- a/
lib/core/collection/array.nit
+++ b/
lib/core/collection/array.nit
@@
-592,7
+592,6
@@
end
# A set implemented with an Array.
class ArraySet[E]
super Set[E]
# A set implemented with an Array.
class ArraySet[E]
super Set[E]
- super Cloneable
# The stored elements.
private var array: Array[E] is noinit
# The stored elements.
private var array: Array[E] is noinit
@@
-794,7
+793,7
@@
class ArrayMap[K, E]
redef fun clone
do
var res = new ArrayMap[K,E]
redef fun clone
do
var res = new ArrayMap[K,E]
- res.recover_with self
+ res.add_all self
return res
end
end
return res
end
end
@@
-956,6
+955,7
@@
redef class Iterator[E]
res.add(item)
next
end
res.add(item)
next
end
+ finish
return res
end
end
return res
end
end
@@
-993,8
+993,7
@@
universal NativeArray[E]
fun copy_to(dest: NativeArray[E], length: Int) is intern
# Copy `length` items to `dest` starting from `dest`.
fun copy_to(dest: NativeArray[E], length: Int) is intern
# Copy `length` items to `dest` starting from `dest`.
- fun memmove(start: Int, length: Int, dest: NativeArray[E], dest_start: Int) do
- # TODO native one
+ fun memmove(start: Int, length: Int, dest: NativeArray[E], dest_start: Int) is intern do
if start < dest_start then
var i = length
while i > 0 do
if start < dest_start then
var i = length
while i > 0 do