Skip to content

Commit

Permalink
Make logic between clusters/attributes/endpoints the same regarding n…
Browse files Browse the repository at this point in the history
…ullopt and wildcards
  • Loading branch information
andy31415 committed Jan 17, 2025
1 parent f91ca92 commit cc10a80
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/app/AttributePathExpandIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,10 @@ std::optional<EndpointId> 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;
Expand Down

0 comments on commit cc10a80

Please sign in to comment.