From bb5dcaa4094d5ca958ec699fae441fe7aeceda59 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Sun, 5 Jan 2014 10:34:23 -0700 Subject: [PATCH] Null properties? I don't see the point. --- builds/4chan-X.user.js | 7 +------ builds/crx/script.js | 7 +------ src/General/lib/randomaccesslist.class | 6 +----- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index d2471009c..609dadbac 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -1460,8 +1460,6 @@ RandomAccessList = (function() { function RandomAccessList() { - this.first = null; - this.last = null; this.length = 0; } @@ -1469,10 +1467,7 @@ var ID, last; ID = item.ID; last = this.last; - $.extend(item, { - prev: last, - next: null - }); + item.prev = last; this[ID] = item; this.last = last ? last.next = item : this.first = item; return this.length++; diff --git a/builds/crx/script.js b/builds/crx/script.js index c42619d77..ed950692f 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1466,8 +1466,6 @@ RandomAccessList = (function() { function RandomAccessList() { - this.first = null; - this.last = null; this.length = 0; } @@ -1475,10 +1473,7 @@ var ID, last; ID = item.ID; last = this.last; - $.extend(item, { - prev: last, - next: null - }); + item.prev = last; this[ID] = item; this.last = last ? last.next = item : this.first = item; return this.length++; diff --git a/src/General/lib/randomaccesslist.class b/src/General/lib/randomaccesslist.class index 0a3de2f0c..902f13fc3 100644 --- a/src/General/lib/randomaccesslist.class +++ b/src/General/lib/randomaccesslist.class @@ -1,15 +1,11 @@ class RandomAccessList constructor: -> - @first = null - @last = null @length = 0 push: (item) -> {ID} = item {last} = @ - $.extend item, - prev: last - next: null + item.prev = last @[ID] = item @last = if last last.next = item