Skip to content

Commit 43ae36f

Browse files
restyled-commitslazarkov
authored andcommitted
Restyled by clang-format
1 parent f07e853 commit 43ae36f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

examples/tv-app/android/java/ContentAppCommandDelegate.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust
138138

139139
std::unique_ptr<Json::CharReader> testReader(readerBuilder.newCharReader());
140140

141-
if (!testReader->parse(respStr.c_str(), respStr.c_str() + std::strlen(respStr.c_str()), &value, &errors)) {
141+
if (!testReader->parse(respStr.c_str(), respStr.c_str() + std::strlen(respStr.c_str()), &value, &errors))
142+
{
142143
ChipLogError(Zcl, "Failed to parse JSON: %s\n", errors.c_str());
143144
env->DeleteLocalRef(resp);
144145
return chip::Protocols::InteractionModel::Status::Failure;
145146
}
146147

147148
// Validate and access JSON data safely
148-
if (!value.isObject()) {
149+
if (!value.isObject())
150+
{
149151
ChipLogError(Zcl, "Invalid JSON structure: not an object");
150152
env->DeleteLocalRef(resp);
151153
return chip::Protocols::InteractionModel::Status::Failure;
@@ -191,13 +193,15 @@ void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::Hand
191193
Json::Value value;
192194
std::unique_ptr<Json::CharReader> testReader(readerBuilder.newCharReader());
193195

194-
if (!testReader->parse(response, response + std::strlen(response), &value, &errors)) {
196+
if (!testReader->parse(response, response + std::strlen(response), &value, &errors))
197+
{
195198
ChipLogError(Zcl, "Failed to parse JSON: %s\n", errors.c_str());
196199
return;
197200
}
198201

199202
// Validate and access JSON data safely
200-
if (!value.isObject()) {
203+
if (!value.isObject())
204+
{
201205
ChipLogError(Zcl, "Invalid JSON structure: not an object");
202206
return;
203207
}

0 commit comments

Comments
 (0)