From 901cb095ae38463f06ff65c25048b629bfeb5a3e Mon Sep 17 00:00:00 2001 From: Robert Zubeck Date: Mon, 10 Dec 2007 20:35:45 +0000 Subject: [PATCH] Weakening the contract on Set.toArray(), to remove the non-modification guarantee from the resulting array. Users requiring strong non-modification guarantees can manually do a deep or a shallow copy of the array, as appropriate for their task. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4905 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/as/com/threerings/util/Set.as | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/as/com/threerings/util/Set.as b/src/as/com/threerings/util/Set.as index fde111aec..0be6c7ea3 100644 --- a/src/as/com/threerings/util/Set.as +++ b/src/as/com/threerings/util/Set.as @@ -49,7 +49,9 @@ public interface Set /** * Returns all elements in the set in an Array. - * Modifying the returned Array will not modify the set. + * + *

Note: this interface does not specify whether modifying the returned Array will modify + * the underlying set; the decision is up to implementation. */ function toArray () :Array; }