Revision: 7682
http://supercollider.svn.sourceforge.net/supercollider/?rev=7682&view=revAuthor: jamshark70
Date: 2008-07-13 06:52:58 -0700 (Sun, 13 Jul 2008)
Log Message:
-----------
wrapAt, clipAt, foldAt (and corresponding *Put) methods now call .asInteger on the index argument, just in case a float is passed in
Modified Paths:
--------------
trunk/build/SCClassLibrary/Common/Collections/List.sc
Modified: trunk/build/SCClassLibrary/Common/Collections/List.sc
===================================================================
--- trunk/build/SCClassLibrary/Common/Collections/List.sc 2008-07-13 13:51:02 UTC (rev 7681)
+++ trunk/build/SCClassLibrary/Common/Collections/List.sc 2008-07-13 13:52:58 UTC (rev 7682)
@@ -36,14 +36,14 @@
// accessing
at { arg i; ^array.at(i) }
- clipAt { arg i; i = i.clip(0, this.size - 1); ^array.at(i) }
- wrapAt { arg i; i = i.wrap(0, this.size - 1); ^array.at(i) }
- foldAt { arg i; i = i.fold(0, this.size - 1); ^array.at(i) }
+ clipAt { arg i; i = i.asInteger.clip(0, this.size - 1); ^array.at(i) }
+ wrapAt { arg i; i = i.asInteger.wrap(0, this.size - 1); ^array.at(i) }
+ foldAt { arg i; i = i.asInteger.fold(0, this.size - 1); ^array.at(i) }
put { arg i, item; array.put(i, item) }
- clipPut { arg i, item; i = i.clip(0, this.size - 1); ^array.put(i, item) }
- wrapPut { arg i, item; i = i.wrap(0, this.size - 1); ^array.put(i, item) }
- foldPut { arg i, item; i = i.fold(0, this.size - 1); ^array.put(i, item) }
+ clipPut { arg i, item; i = i.asInteger.clip(0, this.size - 1); ^array.put(i, item) }
+ wrapPut { arg i, item; i = i.asInteger.wrap(0, this.size - 1); ^array.put(i, item) }
+ foldPut { arg i, item; i = i.asInteger.fold(0, this.size - 1); ^array.put(i, item) }
add { arg item; array = array.add(item); }
addFirst { arg item; array = array.addFirst(item); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
sc-dev mailing list
info (subscribe and unsubscribe):
http://swiki.hfbk-hamburg.de:8888/MusicTechnology/880archive:
http://www.listarc.bham.ac.uk/marchives/sc-dev/search:
http://www.listarc.bham.ac.uk/lists/sc-dev/search/