Compare commits

...

1 Commits

Author SHA1 Message Date
6fa453940f move semantics 2023-03-13 13:29:16 +01:00

View File

@ -1,5 +1,7 @@
#include "DummyPowerSwitcher.h" #include "DummyPowerSwitcher.h"
#include <utility>
DummyPowerSwitcher::DummyPowerSwitcher(object_id_t objectId, size_t numberOfSwitches, DummyPowerSwitcher::DummyPowerSwitcher(object_id_t objectId, size_t numberOfSwitches,
size_t numberOfFuses, bool registerGlobally, size_t numberOfFuses, bool registerGlobally,
uint32_t switchDelayMs) uint32_t switchDelayMs)
@ -9,11 +11,11 @@ DummyPowerSwitcher::DummyPowerSwitcher(object_id_t objectId, size_t numberOfSwit
switchDelayMs(switchDelayMs) {} switchDelayMs(switchDelayMs) {}
void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) { void DummyPowerSwitcher::setInitialSwitcherList(std::vector<ReturnValue_t> switcherList) {
this->switcherList = switcherList; this->switcherList = std::move(switcherList);
} }
void DummyPowerSwitcher::setInitialFusesList(std::vector<ReturnValue_t> fuseList) { void DummyPowerSwitcher::setInitialFusesList(std::vector<ReturnValue_t> fuseList) {
this->fuseList = fuseList; this->fuseList = std::move(fuseList);
} }
ReturnValue_t DummyPowerSwitcher::sendSwitchCommand(power::Switch_t switchNr, ReturnValue_t onOff) { ReturnValue_t DummyPowerSwitcher::sendSwitchCommand(power::Switch_t switchNr, ReturnValue_t onOff) {