use reference to avoid copying
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
101564bb6a
commit
7df46560ee
@ -11,7 +11,7 @@ public:
|
|||||||
this->protocol = protocol;
|
this->protocol = protocol;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void fromJson(JsonObjectConst rcSwitch, RCSwitch& rcDevice) {
|
virtual void fromJson(JsonObjectConst& rcSwitch, RCSwitch& rcDevice) {
|
||||||
unsigned int protocol = rcSwitch["protocol"];
|
unsigned int protocol = rcSwitch["protocol"];
|
||||||
rcDevice.setProtocol(protocol);
|
rcDevice.setProtocol(protocol);
|
||||||
rcDevice.send(rcSwitch["value"]);
|
rcDevice.send(rcSwitch["value"]);
|
||||||
|
|||||||
@ -11,7 +11,7 @@ public:
|
|||||||
Protocol_1() : Protocol(1) {
|
Protocol_1() : Protocol(1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void fromJson(JsonObjectConst rcSwitch, RCSwitch& rcDevice) override {
|
void fromJson(JsonObjectConst& rcSwitch, RCSwitch& rcDevice) override {
|
||||||
unsigned int protocol = rcSwitch["protocol"];
|
unsigned int protocol = rcSwitch["protocol"];
|
||||||
rcDevice.setProtocol(protocol);
|
rcDevice.setProtocol(protocol);
|
||||||
char* group = rcSwitch["group"];
|
char* group = rcSwitch["group"];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user