summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2014-07-17 09:12:20 +0200
committerjmoenig <jens@moenig.org>2014-07-17 09:12:20 +0200
commitff854784c0bb86c2a28818284876b045cabc10a1 (patch)
treee54bc730ff3f4be5d0507d654d87d73ddaf4a201
parentfe8f15b8c7a12b8a5d5d6c15cdc19cde4a2838bc (diff)
downloadsnap-ff854784c0bb86c2a28818284876b045cabc10a1.tar.gz
snap-ff854784c0bb86c2a28818284876b045cabc10a1.zip
format list changes for JSLint
and rename var ‘me’ to ‘myself’ to make it conform to the rest of Snap’s codebase
-rw-r--r--lists.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/lists.js b/lists.js
index d9af5b5..1674d1c 100644
--- a/lists.js
+++ b/lists.js
@@ -61,7 +61,7 @@ PushButtonMorph, SyntaxElementMorph, Color, Point, WatcherMorph,
StringMorph, SpriteMorph, ScrollFrameMorph, CellMorph, ArrowMorph,
MenuMorph, snapEquals, Morph, isNil, localize, MorphicPreferences*/
-modules.lists = '2014-Jun-04';
+modules.lists = '2014-July-14';
var List;
var ListWatcherMorph;
@@ -281,8 +281,8 @@ List.prototype.becomeArray = function () {
this.contents.push(next.at(i));
}
this.isLinked = false;
- this.first = null;
- this.rest = null;
+ this.first = null;
+ this.rest = null;
}
};
@@ -304,43 +304,43 @@ List.prototype.becomeLinked = function () {
// List testing
List.prototype.equalTo = function (other) {
- var me = this, it = other, i, j, loopcount;
+ var myself = this, it = other, i, j, loopcount;
if (!(other instanceof List)) {
return false;
}
- while (me.isLinked && it.isLinked) {
- if (!snapEquals(me.first, it.first)) {
+ while (myself.isLinked && it.isLinked) {
+ if (!snapEquals(myself.first, it.first)) {
return false;
}
- me = me.rest;
+ myself = myself.rest;
it = it.rest;
}
if (it.isLinked) {
i = it;
- it = me;
- me = i;
+ it = myself;
+ myself = i;
}
j = 0;
- while (me.isLinked) {
- if (!snapEquals(me.first, it.contents[j])) {
+ while (myself.isLinked) {
+ if (!snapEquals(myself.first, it.contents[j])) {
return false;
}
- me = me.rest;
+ myself = myself.rest;
j += 1;
}
i = 0;
- if (me.contents.length !== (it.contents.length - j)) {
+ if (myself.contents.length !== (it.contents.length - j)) {
return false;
}
- loopcount = me.contents.length;
+ loopcount = myself.contents.length;
while (loopcount > 0) {
loopcount -= 1;
- if (!snapEquals(me.contents[i], it.contents[j])) {
+ if (!snapEquals(myself.contents[i], it.contents[j])) {
return false;
}
i += 1;