Switched to Google coding style to match cpplint expectations

This commit is contained in:
Benoit Blanchon
2014-10-23 23:13:13 +02:00
parent 5c8283b3e4
commit b43da1e421
47 changed files with 262 additions and 308 deletions

View File

@ -36,32 +36,26 @@ size_t JsonContainer::prettyPrintTo(Print &print) const {
}
JsonNode *JsonContainer::createNode() {
if (!_node)
return 0;
if (!_node) return 0;
JsonBuffer *buffer = _node->getContainerBuffer();
if (!buffer)
return 0;
if (!buffer) return 0;
return buffer->createNode();
}
bool JsonContainer::operator==(const JsonContainer &other) const {
if (_node == other._node)
return true;
if (!_node || !other._node)
return false;
if (_node == other._node) return true;
if (!_node || !other._node) return false;
return _node->getProxyTarget() == other._node->getProxyTarget();
}
void JsonContainer::addChild(JsonNode *childToAdd) {
if (_node)
_node->addChild(childToAdd);
if (_node) _node->addChild(childToAdd);
}
void JsonContainer::removeChild(JsonNode *childToRemove) {
if (_node)
_node->removeChild(childToRemove);
if (_node) _node->removeChild(childToRemove);
}
size_t JsonContainer::size() const {