Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and achaulk-goog committed Mar 31, 2023
1 parent 27dea91 commit 90470c3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/chef/common/stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ class LockManager

struct User
{
void set(chip::CharSpan newName, uint32_t userId, UserStatusEnum userStatus, UserTypeEnum type, CredentialRuleEnum credentialRule)
void set(chip::CharSpan newName, uint32_t userId, UserStatusEnum userStatus, UserTypeEnum type,
CredentialRuleEnum credentialRule)
{
size_t sz = std::min(sizeof(name), newName.size());
memcpy(name, newName.data(), sz);
Expand Down Expand Up @@ -121,7 +122,8 @@ class LockManager
}

bool setCredential(chip::EndpointId endpointId, uint16_t credentialIndex, chip::FabricIndex creator, chip::FabricIndex modifier,
DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType, const chip::ByteSpan & credentialData)
DlCredentialStatus credentialStatus, CredentialTypeEnum credentialType,
const chip::ByteSpan & credentialData)
{
auto ep = findEndpoint(endpointId);
if (!ep)
Expand Down Expand Up @@ -177,8 +179,7 @@ class LockManager
{
endpoints[0].id = 1;
uint8_t pin[6] = { 0x31, 0x32, 0x33, 0x34, 0x35, 0x36 };
endpoints[0].credentials[0].set(DlCredentialStatus::kOccupied,
CredentialTypeEnum::kPin, chip::ByteSpan(pin));
endpoints[0].credentials[0].set(DlCredentialStatus::kOccupied, CredentialTypeEnum::kPin, chip::ByteSpan(pin));
endpoints[0].users[0].set(chip::CharSpan("default"), 1, UserStatusEnum::kOccupiedEnabled, UserTypeEnum::kUnrestrictedUser,
CredentialRuleEnum::kSingle);
endpoints[0].users[0].addCredential(CredentialTypeEnum::kPin, 1);
Expand Down

0 comments on commit 90470c3

Please sign in to comment.