From 6786acfc83d5e7f3267019ec16246b5aeeade0fb Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Fri, 8 Dec 2023 22:02:00 +0000 Subject: [PATCH] Restyled by clang-format --- .../sample-mei-server/sample-mei-server.cpp | 26 ++++++++++--------- .../sample-mei-server/sample-mei-server.h | 1 - 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/app/clusters/sample-mei-server/sample-mei-server.cpp b/src/app/clusters/sample-mei-server/sample-mei-server.cpp index 749dfbc1e05355..22a8f48bdf8a00 100644 --- a/src/app/clusters/sample-mei-server/sample-mei-server.cpp +++ b/src/app/clusters/sample-mei-server/sample-mei-server.cpp @@ -59,7 +59,7 @@ SampleMeiContent::SampleMeiContent() : SampleMeiContent(kInvalidEndpointId) {} SampleMeiContent::SampleMeiContent(EndpointId aEndpoint) { - endpoint = aEndpoint; + endpoint = aEndpoint; pingCount = 10000; // Attribute default values @@ -83,17 +83,19 @@ void SampleMeiServer::InvokeCommand(HandlerContext & ctxt) switch (ctxt.mRequestPath.mCommandId) { case Commands::Ping::Id: - HandleCommand(ctxt, [this, endpoint, fabricIndex, endpointIndex, ctxt](HandlerContext & ctx, const auto & req) { - ChipLogProgress(Zcl, "Ping Command on Ep %d", endpoint); - Events::PingCountEvent::Type event{ .count = content[endpointIndex].pingCount++, .fabricIndex = fabricIndex }; - chip::EventNumber placeholderEventNumber; - CHIP_ERROR err = LogEvent(event, endpoint, placeholderEventNumber); - if (CHIP_NO_ERROR != err) - { - ChipLogError(Zcl, "Failed to record event on endpoint %d: %" CHIP_ERROR_FORMAT, static_cast(endpoint), err.Format()); - } - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::Success); - }); + HandleCommand( + ctxt, [this, endpoint, fabricIndex, endpointIndex, ctxt](HandlerContext & ctx, const auto & req) { + ChipLogProgress(Zcl, "Ping Command on Ep %d", endpoint); + Events::PingCountEvent::Type event{ .count = content[endpointIndex].pingCount++, .fabricIndex = fabricIndex }; + chip::EventNumber placeholderEventNumber; + CHIP_ERROR err = LogEvent(event, endpoint, placeholderEventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "Failed to record event on endpoint %d: %" CHIP_ERROR_FORMAT, static_cast(endpoint), + err.Format()); + } + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::Success); + }); return; case Commands::AddArguments::Id: HandleCommand(ctxt, [endpoint](HandlerContext & ctx, const auto & req) { diff --git a/src/app/clusters/sample-mei-server/sample-mei-server.h b/src/app/clusters/sample-mei-server/sample-mei-server.h index c7a11fb6aaf480..9f5307dba6d753 100644 --- a/src/app/clusters/sample-mei-server/sample-mei-server.h +++ b/src/app/clusters/sample-mei-server/sample-mei-server.h @@ -37,7 +37,6 @@ class SampleMeiContent // Attribute List bool flipflop; /* Attributes::FlipFlop::Id */ - SampleMeiContent(EndpointId endpoint); SampleMeiContent(); };