@@ -592,7 +592,7 @@ CHIP_ERROR CommandHandler::PrepareInvokeResponseCommand(const ConcreteCommandPat
592
592
auto commandPathRegistryEntry = GetCommandPathRegistry ().Find (aPrepareParameters.mRequestCommandPath );
593
593
VerifyOrReturnValue (commandPathRegistryEntry.has_value (), CHIP_ERROR_INCORRECT_STATE);
594
594
595
- return PrepareInvokeResponseCommand (commandPathRegistryEntry. value () , aResponseCommandPath,
595
+ return PrepareInvokeResponseCommand (* commandPathRegistryEntry, aResponseCommandPath,
596
596
aPrepareParameters.mStartOrEndDataStruct );
597
597
}
598
598
@@ -612,7 +612,7 @@ CHIP_ERROR CommandHandler::PrepareCommand(const ConcreteCommandPath & aResponseC
612
612
auto commandPathRegistryEntry = GetCommandPathRegistry ().GetFirstEntry ();
613
613
VerifyOrReturnValue (commandPathRegistryEntry.has_value (), CHIP_ERROR_INCORRECT_STATE);
614
614
615
- return PrepareInvokeResponseCommand (commandPathRegistryEntry. value () , aResponseCommandPath, aStartDataStruct);
615
+ return PrepareInvokeResponseCommand (* commandPathRegistryEntry, aResponseCommandPath, aStartDataStruct);
616
616
}
617
617
618
618
CHIP_ERROR CommandHandler::PrepareInvokeResponseCommand (const CommandPathRegistryEntry & apCommandPathRegistryEntry,
@@ -677,7 +677,7 @@ CHIP_ERROR CommandHandler::FinishCommand(bool aStartDataStruct)
677
677
678
678
if (mRefForResponse .has_value ())
679
679
{
680
- ReturnErrorOnFailure (commandData.Ref (mRefForResponse . value () ));
680
+ ReturnErrorOnFailure (commandData.Ref (* mRefForResponse ));
681
681
}
682
682
683
683
ReturnErrorOnFailure (commandData.EndOfCommandDataIB ());
@@ -700,7 +700,7 @@ CHIP_ERROR CommandHandler::PrepareStatus(const ConcreteCommandPath & aCommandPat
700
700
701
701
auto commandPathRegistryEntry = GetCommandPathRegistry ().Find (aCommandPath);
702
702
VerifyOrReturnError (commandPathRegistryEntry.has_value (), CHIP_ERROR_INCORRECT_STATE);
703
- mRefForResponse = commandPathRegistryEntry. value (). ref ;
703
+ mRefForResponse = commandPathRegistryEntry-> ref ;
704
704
705
705
MoveToState (State::Preparing);
706
706
InvokeResponseIBs::Builder & invokeResponses = mInvokeResponseBuilder .GetInvokeResponses ();
@@ -722,7 +722,7 @@ CHIP_ERROR CommandHandler::FinishStatus()
722
722
CommandStatusIB::Builder & commandStatus = mInvokeResponseBuilder .GetInvokeResponses ().GetInvokeResponse ().GetStatus ();
723
723
if (mRefForResponse .has_value ())
724
724
{
725
- ReturnErrorOnFailure (commandStatus.Ref (mRefForResponse . value () ));
725
+ ReturnErrorOnFailure (commandStatus.Ref (* mRefForResponse ));
726
726
}
727
727
728
728
ReturnErrorOnFailure (mInvokeResponseBuilder .GetInvokeResponses ().GetInvokeResponse ().GetStatus ().EndOfCommandStatusIB ());
0 commit comments