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 wqx6 committed Dec 15, 2023
1 parent 4192753 commit 8a2aa22
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 24 deletions.
15 changes: 5 additions & 10 deletions src/app/InteractionModelEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,13 @@ namespace app {
class AutoReleaseSubscriptionInfoIterator
{
public:
AutoReleaseSubscriptionInfoIterator(SubscriptionResumptionStorage::SubscriptionInfoIterator *iterator) : mIterator(iterator) {};
~AutoReleaseSubscriptionInfoIterator()
{
mIterator->Release();
}
AutoReleaseSubscriptionInfoIterator(SubscriptionResumptionStorage::SubscriptionInfoIterator * iterator) : mIterator(iterator){};
~AutoReleaseSubscriptionInfoIterator() { mIterator->Release(); }

SubscriptionResumptionStorage::SubscriptionInfoIterator * operator->() const { return mIterator; }

SubscriptionResumptionStorage::SubscriptionInfoIterator *operator->() const
{
return mIterator;
}
private:
SubscriptionResumptionStorage::SubscriptionInfoIterator *mIterator;
SubscriptionResumptionStorage::SubscriptionInfoIterator * mIterator;
};

using Protocols::InteractionModel::Status;
Expand Down
3 changes: 2 additions & 1 deletion src/app/ReadHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ ReadHandler::ReadHandler(ManagementCallback & apCallback, Observer * observer) :
mObserver = observer;
}

void ReadHandler::OnSubscriptionResumed(const SessionHandle & sessionHandle, SubscriptionResumptionSessionEstablisher & resumptionSessionEstablisher)
void ReadHandler::OnSubscriptionResumed(const SessionHandle & sessionHandle,
SubscriptionResumptionSessionEstablisher & resumptionSessionEstablisher)
{
mSubscriptionId = resumptionSessionEstablisher.mSubscriptionInfo.mSubscriptionId;
mMinIntervalFloorSeconds = resumptionSessionEstablisher.mSubscriptionInfo.mMinInterval;
Expand Down
18 changes: 5 additions & 13 deletions src/app/SubscriptionResumptionSessionEstablisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,13 @@ namespace app {
class AutoDeleteEstablisher
{
public:
AutoDeleteEstablisher(SubscriptionResumptionSessionEstablisher * sessionEstablisher) : mSessionEstablisher(sessionEstablisher) {}
~AutoDeleteEstablisher()
{
chip::Platform::Delete(mSessionEstablisher);
}
AutoDeleteEstablisher(SubscriptionResumptionSessionEstablisher * sessionEstablisher) : mSessionEstablisher(sessionEstablisher)
{}
~AutoDeleteEstablisher() { chip::Platform::Delete(mSessionEstablisher); }

SubscriptionResumptionSessionEstablisher * operator->() const
{
return mSessionEstablisher;
}
SubscriptionResumptionSessionEstablisher * operator->() const { return mSessionEstablisher; }

SubscriptionResumptionSessionEstablisher & operator*() const
{
return *mSessionEstablisher;
}
SubscriptionResumptionSessionEstablisher & operator*() const { return *mSessionEstablisher; }

private:
SubscriptionResumptionSessionEstablisher * mSessionEstablisher;
Expand Down

0 comments on commit 8a2aa22

Please sign in to comment.