Null properties? I don't see the point.
This commit is contained in:
parent
482f6444fe
commit
bb5dcaa409
@ -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++;
|
||||
|
||||
@ -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++;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user