From d217a68908a8c7f5555a56325ba22e92a2bd7e7a Mon Sep 17 00:00:00 2001 From: Alan Woodland Date: Mon, 16 May 2016 21:29:22 +0100 Subject: [PATCH] added more comments in a few places --- Lib/java/std_list.i | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/java/std_list.i b/Lib/java/std_list.i index 932980d67..35f0ecac8 100644 --- a/Lib/java/std_list.i +++ b/Lib/java/std_list.i @@ -104,6 +104,7 @@ namespace std { public $javaclassname(Collection c) { this(); ListIterator it = listIterator(0); + // We should special case the "copy constructor" here to avoid lots of cross-language calls for (Object o: c) { it.add((JAVA_VALUE_TYPE)o); } @@ -167,6 +168,7 @@ namespace std { } public boolean hasPrevious() { + // This call to previousIndex() will be much slower than the hasNext() implementation, but it's simpler like this with C++ forward iterators return previousIndex() != -1; }