From cc10a8054edcb092e2a2b132e3df10efce1f7de6 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 17 Jan 2025 10:08:33 -0500 Subject: [PATCH] Make logic between clusters/attributes/endpoints the same regarding nullopt and wildcards --- src/app/AttributePathExpandIterator.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp index 761ede1faf3f2a..d22812e0bbdce9 100644 --- a/src/app/AttributePathExpandIterator.cpp +++ b/src/app/AttributePathExpandIterator.cpp @@ -305,13 +305,10 @@ std::optional AttributePathExpandIterator::NextEndpointId() } else { - // If endpoints is not a wildcard and we enter here, we are asked for "next endpoint after the first" - // however this is not a wildcard expansion, so we retur nullopt in that case - // the `kInvalidEndpointId` check above returns the first value. - VerifyOrReturnValue(mPosition.mAttributePath->mValue.HasWildcardEndpointId(), std::nullopt); mEndpointIndex++; } + VerifyOrReturnValue(mPosition.mAttributePath->mValue.HasWildcardEndpointId(), std::nullopt); VerifyOrReturnValue(mEndpointIndex < mEndpoints.size(), std::nullopt); return mEndpoints[mEndpointIndex].id;