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() {
|
||||
if(d->protocolName == L"group") {
|
||||
return TELLSTICK_TYPE_GROUP;
|
||||
}
|
||||
else if(d->protocolName == L"scene") {
|
||||
} else if(d->protocolName == L"scene") {
|
||||
return TELLSTICK_TYPE_SCENE;
|
||||
}
|
||||
return TELLSTICK_TYPE_DEVICE;
|
||||
|
|
|
@ -62,8 +62,7 @@ void EventUpdateManager::run() {
|
|||
if(data) {
|
||||
d->clients.push_back(data->socket);
|
||||
}
|
||||
}
|
||||
else if(d->updateEvent->isSignaled()) {
|
||||
} else if(d->updateEvent->isSignaled()) {
|
||||
// device event, signal all clients
|
||||
TelldusCore::EventDataRef eventData = d->updateEvent->takeSignal();
|
||||
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")) {
|
||||
return new ProtocolGroup();
|
||||
}
|
||||
|
||||
else if (TelldusCore::comparei(protocolname, L"scene")) {
|
||||
} else if (TelldusCore::comparei(protocolname, L"scene")) {
|
||||
return new ProtocolScene();
|
||||
}
|
||||
|
||||
|
@ -232,32 +231,27 @@ std::list<std::string> Protocol::decodeData(const std::string &fullData) {
|
|||
if (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);
|
||||
if (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);
|
||||
if (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);
|
||||
if (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);
|
||||
if (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);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
|
|
|
@ -62,11 +62,9 @@ std::string ProtocolWaveman::decodeData(ControllerMessage& dataMsg) {
|
|||
|
||||
if(method == 0) {
|
||||
retString << ";unit:" << unit << ";method:turnoff;";
|
||||
|
||||
} else if(method == 14) {
|
||||
retString << ";unit:" << unit << ";method:turnon;";
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// not waveman
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue