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
@@ -20,13 +20,13 @@ class MouseAction extends KeyAction {
mouseAction: MouseActionParam;
_fromJsObject(jsObject: any): MouseAction {
this.assertKeyActionType(jsObject, keyActionType.MouseAction, 'MouseAction');
this.assertKeyActionType(jsObject);
this.mouseAction = MouseActionParam[<string> jsObject.mouseAction];
return this;
}
_fromBinary(buffer: UhkBuffer): MouseAction {
this.readAndAssertKeyActionId(buffer, KeyActionId.MouseAction, 'MouseAction');
this.readAndAssertKeyActionId(buffer);
this.mouseAction = buffer.readUInt8();
return this;
}