Skip to content

Commit db7c54a

Browse files
authored
Minor update: avoid extra constructor on IsExistentAttributePath (project-chip#36130)
1 parent 8c31c3f commit db7c54a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/app/InteractionModelEngine.cpp

+2-8
Original file line numberDiff line numberDiff line change
@@ -1507,20 +1507,14 @@ bool InteractionModelEngine::IsExistentAttributePath(const ConcreteAttributePath
15071507
{
15081508
#if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE
15091509
#if CHIP_CONFIG_USE_EMBER_DATA_MODEL
1510-
1511-
bool providerResult = GetDataModelProvider()
1512-
->GetAttributeInfo(ConcreteAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId))
1513-
.has_value();
1510+
bool providerResult = GetDataModelProvider()->GetAttributeInfo(path).has_value();
15141511

15151512
bool emberResult = emberAfContainsAttribute(path.mEndpointId, path.mClusterId, path.mAttributeId);
15161513

15171514
// Ensure that Provider interface and ember are IDENTICAL in attribute location (i.e. "check" mode)
15181515
VerifyOrDie(providerResult == emberResult);
15191516
#endif
1520-
1521-
return GetDataModelProvider()
1522-
->GetAttributeInfo(ConcreteAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId))
1523-
.has_value();
1517+
return GetDataModelProvider()->GetAttributeInfo(path).has_value();
15241518
#else
15251519
return emberAfContainsAttribute(path.mEndpointId, path.mClusterId, path.mAttributeId);
15261520
#endif

0 commit comments

Comments
 (0)