From db7c54a53c094988840de612692c5af0552c8993 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Mon, 21 Oct 2024 10:29:46 -0400 Subject: [PATCH] Minor update: avoid extra constructor on IsExistentAttributePath (#36130) --- src/app/InteractionModelEngine.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 269cc7f9158ee3..d88299c29da412 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -1507,20 +1507,14 @@ bool InteractionModelEngine::IsExistentAttributePath(const ConcreteAttributePath { #if CHIP_CONFIG_USE_DATA_MODEL_INTERFACE #if CHIP_CONFIG_USE_EMBER_DATA_MODEL - - bool providerResult = GetDataModelProvider() - ->GetAttributeInfo(ConcreteAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId)) - .has_value(); + bool providerResult = GetDataModelProvider()->GetAttributeInfo(path).has_value(); bool emberResult = emberAfContainsAttribute(path.mEndpointId, path.mClusterId, path.mAttributeId); // Ensure that Provider interface and ember are IDENTICAL in attribute location (i.e. "check" mode) VerifyOrDie(providerResult == emberResult); #endif - - return GetDataModelProvider() - ->GetAttributeInfo(ConcreteAttributePath(path.mEndpointId, path.mClusterId, path.mAttributeId)) - .has_value(); + return GetDataModelProvider()->GetAttributeInfo(path).has_value(); #else return emberAfContainsAttribute(path.mEndpointId, path.mClusterId, path.mAttributeId); #endif