mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 15:24:52 +09:00
Remove usage of ++ outside of for loops update
The usage of postfix ++ is somewhat obscure in its meaning. It's better to be explicit here.
This commit is contained in:
1 parent
3ce32ba870
commit
5337280eec
8 files changed
+21
-14
No files matched your search
@@ -24,7 +24,7 @@ describe("Integration of lib/factorio/export", function() {
|
||||
|
||||
// Value is always a string, nearly always truthy
|
||||
if (!value) {
|
||||
empty_keys++;
|
||||
empty_keys += 1;
|
||||
}
|
||||
assert.equal(typeof value, "string");
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ describe("lib/factorio", function() {
|
||||
} catch (err) { }
|
||||
if (success) {
|
||||
validate(modules);
|
||||
successCount++;
|
||||
successCount += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -58,10 +58,12 @@ class MockConnector extends events.EventEmitter {
|
||||
}
|
||||
|
||||
send(type, data) {
|
||||
let message = { seq: this._seq, type, data };
|
||||
let seq = this._seq;
|
||||
this._seq += 1;
|
||||
let message = { seq, type, data };
|
||||
this.sentMessages.push(message);
|
||||
setImmediate(() => this.emit("send", message));
|
||||
return this._seq++;
|
||||
return seq;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user