Make KeyAction.assertKeyActiontype() and KeyAction.readAndAssertKeyActionId() only expect a single argument.

This commit is contained in:
László Monda
2016-04-09 00:39:17 +02:00
parent a3b83dfb36
commit 34ff0d657d
11 changed files with 27 additions and 26 deletions

View File

@@ -4,13 +4,13 @@ class SwitchKeymapAction extends KeyAction {
keymapId: number;
_fromJsObject(jsObject: any): SwitchKeymapAction {
this.assertKeyActionType(jsObject, keyActionType.SwitchKeymapAction, 'SwitchKeymapAction');
this.assertKeyActionType(jsObject);
this.keymapId = jsObject.keymapId;
return this;
}
_fromBinary(buffer: UhkBuffer): SwitchKeymapAction {
this.readAndAssertKeyActionId(buffer, KeyActionId.SwitchKeymapAction, 'SwitchKeymapAction');
this.readAndAssertKeyActionId(buffer);
this.keymapId = buffer.readUInt8();
return this;
}