1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

CapabilityInquiryDemo: Fix shadowing warnings

This commit is contained in:
reuk 2024-01-22 11:44:26 +00:00
parent 3b3cd1bf1f
commit 6c32c4df87
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C

View file

@ -3878,19 +3878,22 @@ private:
// If we're already subscribed, end that subscription.
// Otherwise, begin a new subscription to this resource.
const auto changedToken = [this, propName = propName, muid = muid, existingToken = existingToken]() -> std::optional<ci::SubscriptionKey>
const auto changedToken = [this,
propNameCopy = propName,
muidCopy = muid,
existingTokenCopy = existingToken]() -> std::optional<ci::SubscriptionKey>
{
// We're not subscribed, so begin a new subscription
if (! existingToken.has_value())
if (! existingTokenCopy.has_value())
{
ci::PropertySubscriptionHeader header;
header.resource = propName;
header.resource = propNameCopy;
header.command = ci::PropertySubscriptionCommand::start;
return device->beginSubscription (muid, header);
return device->beginSubscription (muidCopy, header);
}
device->endSubscription (*existingToken);
return existingToken;
device->endSubscription (*existingTokenCopy);
return existingTokenCopy;
}();
if (changedToken.has_value())