cleanup: Don't use Array/Object constructors
The corresponding literals are more concise and cleaner. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/731
This commit is contained in:
parent
e585f7d97b
commit
81ab2865f7
@ -877,9 +877,9 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
|
|||||||
_init(windows) {
|
_init(windows) {
|
||||||
super._init(false);
|
super._init(false);
|
||||||
|
|
||||||
this._labels = new Array();
|
this._labels = [];
|
||||||
this._thumbnailBins = new Array();
|
this._thumbnailBins = [];
|
||||||
this._clones = new Array();
|
this._clones = [];
|
||||||
this._windows = windows;
|
this._windows = windows;
|
||||||
|
|
||||||
for (let i = 0; i < windows.length; i++) {
|
for (let i = 0; i < windows.length; i++) {
|
||||||
@ -940,7 +940,7 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure we only do this once
|
// Make sure we only do this once
|
||||||
this._thumbnailBins = new Array();
|
this._thumbnailBins = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
_removeThumbnail(source, clone) {
|
_removeThumbnail(source, clone) {
|
||||||
|
@ -104,9 +104,10 @@ class KeyContainer extends St.Widget {
|
|||||||
this._currentRow++;
|
this._currentRow++;
|
||||||
this._currentCol = 0;
|
this._currentCol = 0;
|
||||||
|
|
||||||
let row = new Object();
|
let row = {
|
||||||
row.keys = [];
|
keys: [],
|
||||||
row.width = 0;
|
width: 0,
|
||||||
|
};
|
||||||
this._rows.push(row);
|
this._rows.push(row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user