1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 16:57:59 +01:00

Remove unnecessary use of values() when iterating over arrays.

This commit is contained in:
Doug Kearns
2015-05-11 23:56:31 +10:00
parent a8e70d3f43
commit 48acf656ec
27 changed files with 81 additions and 80 deletions

View File

@@ -81,7 +81,7 @@ var ProcessorStack = Class("ProcessorStack", {
// those waiting on further arguments. Execute actions as
// long as they continue to return PASS.
for (var action of values(this.actions)) {
for (var action of this.actions) {
while (callable(action)) {
length = action.eventLength;
action = dactyl.trapErrors(action);
@@ -196,14 +196,14 @@ var ProcessorStack = Class("ProcessorStack", {
this._actions = actions;
this.actions = actions.concat(this.actions);
for (let action of values(actions))
for (let action of actions)
if (!("eventLength" in action))
action.eventLength = this.events.length;
if (result === Events.KILL)
this.actions = [];
else if (!this.actions.length && !processors.length)
for (let input of values(this.processors))
for (let input of this.processors)
if (input.fallthrough) {
if (result === Events.KILL)
break;