An else should appear on the same line as the preceding } according to Google style guidelines "whitespace/newline"
This commit is contained in:
parent
1f9a069df7
commit
a01b42b4d7
4 changed files with 9 additions and 19 deletions
|
@ -131,8 +131,7 @@ std::wstring Device::getStateValue() {
|
||||||
int Device::getType() {
|
int Device::getType() {
|
||||||
if(d->protocolName == L"group") {
|
if(d->protocolName == L"group") {
|
||||||
return TELLSTICK_TYPE_GROUP;
|
return TELLSTICK_TYPE_GROUP;
|
||||||
}
|
} else if(d->protocolName == L"scene") {
|
||||||
else if(d->protocolName == L"scene") {
|
|
||||||
return TELLSTICK_TYPE_SCENE;
|
return TELLSTICK_TYPE_SCENE;
|
||||||
}
|
}
|
||||||
return TELLSTICK_TYPE_DEVICE;
|
return TELLSTICK_TYPE_DEVICE;
|
||||||
|
|
|
@ -62,8 +62,7 @@ void EventUpdateManager::run() {
|
||||||
if(data) {
|
if(data) {
|
||||||
d->clients.push_back(data->socket);
|
d->clients.push_back(data->socket);
|
||||||
}
|
}
|
||||||
}
|
} else if(d->updateEvent->isSignaled()) {
|
||||||
else if(d->updateEvent->isSignaled()) {
|
|
||||||
// device event, signal all clients
|
// device event, signal all clients
|
||||||
TelldusCore::EventDataRef eventData = d->updateEvent->takeSignal();
|
TelldusCore::EventDataRef eventData = d->updateEvent->takeSignal();
|
||||||
EventUpdateData *data = reinterpret_cast<EventUpdateData*>(eventData.get());
|
EventUpdateData *data = reinterpret_cast<EventUpdateData*>(eventData.get());
|
||||||
|
|
|
@ -141,9 +141,8 @@ Protocol *Protocol::getProtocolInstance(const std::wstring &protocolname) {
|
||||||
|
|
||||||
} else if (TelldusCore::comparei(protocolname, L"group")) {
|
} else if (TelldusCore::comparei(protocolname, L"group")) {
|
||||||
return new ProtocolGroup();
|
return new ProtocolGroup();
|
||||||
}
|
|
||||||
|
|
||||||
else if (TelldusCore::comparei(protocolname, L"scene")) {
|
} else if (TelldusCore::comparei(protocolname, L"scene")) {
|
||||||
return new ProtocolScene();
|
return new ProtocolScene();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,32 +231,27 @@ std::list<std::string> Protocol::decodeData(const std::string &fullData) {
|
||||||
if (decoded != "") {
|
if (decoded != "") {
|
||||||
retval.push_back(decoded);
|
retval.push_back(decoded);
|
||||||
}
|
}
|
||||||
}
|
} else if(TelldusCore::comparei(dataMsg.protocol(), L"everflourish") ) {
|
||||||
else if(TelldusCore::comparei(dataMsg.protocol(), L"everflourish") ) {
|
|
||||||
decoded = ProtocolEverflourish::decodeData(dataMsg);
|
decoded = ProtocolEverflourish::decodeData(dataMsg);
|
||||||
if (decoded != "") {
|
if (decoded != "") {
|
||||||
retval.push_back(decoded);
|
retval.push_back(decoded);
|
||||||
}
|
}
|
||||||
}
|
} else if(TelldusCore::comparei(dataMsg.protocol(), L"fineoffset") ) {
|
||||||
else if(TelldusCore::comparei(dataMsg.protocol(), L"fineoffset") ) {
|
|
||||||
decoded = ProtocolFineoffset::decodeData(dataMsg);
|
decoded = ProtocolFineoffset::decodeData(dataMsg);
|
||||||
if (decoded != "") {
|
if (decoded != "") {
|
||||||
retval.push_back(decoded);
|
retval.push_back(decoded);
|
||||||
}
|
}
|
||||||
}
|
} else if(TelldusCore::comparei(dataMsg.protocol(), L"mandolyn") ) {
|
||||||
else if(TelldusCore::comparei(dataMsg.protocol(), L"mandolyn") ) {
|
|
||||||
decoded = ProtocolMandolyn::decodeData(dataMsg);
|
decoded = ProtocolMandolyn::decodeData(dataMsg);
|
||||||
if (decoded != "") {
|
if (decoded != "") {
|
||||||
retval.push_back(decoded);
|
retval.push_back(decoded);
|
||||||
}
|
}
|
||||||
}
|
} else if(TelldusCore::comparei(dataMsg.protocol(), L"oregon") ) {
|
||||||
else if(TelldusCore::comparei(dataMsg.protocol(), L"oregon") ) {
|
|
||||||
decoded = ProtocolOregon::decodeData(dataMsg);
|
decoded = ProtocolOregon::decodeData(dataMsg);
|
||||||
if (decoded != "") {
|
if (decoded != "") {
|
||||||
retval.push_back(decoded);
|
retval.push_back(decoded);
|
||||||
}
|
}
|
||||||
}
|
} else if(TelldusCore::comparei(dataMsg.protocol(), L"x10") ) {
|
||||||
else if(TelldusCore::comparei(dataMsg.protocol(), L"x10") ) {
|
|
||||||
decoded = ProtocolX10::decodeData(dataMsg);
|
decoded = ProtocolX10::decodeData(dataMsg);
|
||||||
if (decoded != "") {
|
if (decoded != "") {
|
||||||
retval.push_back(decoded);
|
retval.push_back(decoded);
|
||||||
|
|
|
@ -62,11 +62,9 @@ std::string ProtocolWaveman::decodeData(ControllerMessage& dataMsg) {
|
||||||
|
|
||||||
if(method == 0) {
|
if(method == 0) {
|
||||||
retString << ";unit:" << unit << ";method:turnoff;";
|
retString << ";unit:" << unit << ";method:turnoff;";
|
||||||
|
|
||||||
} else if(method == 14) {
|
} else if(method == 14) {
|
||||||
retString << ";unit:" << unit << ";method:turnon;";
|
retString << ";unit:" << unit << ";method:turnon;";
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
// not waveman
|
// not waveman
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue