mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
InAppPurchasesDemo: Avoid copies in range-for loops
This commit is contained in:
parent
cb14ac2cae
commit
91dde1576d
1 changed files with 4 additions and 4 deletions
|
|
@ -192,7 +192,7 @@ private:
|
|||
{
|
||||
purchaseInProgress = false;
|
||||
|
||||
for (const auto productId : info.purchase.productIds)
|
||||
for (const auto& productId : info.purchase.productIds)
|
||||
{
|
||||
auto idx = findVoiceIndexFromIdentifier (productId);
|
||||
|
||||
|
|
@ -218,9 +218,9 @@ private:
|
|||
{
|
||||
if (success)
|
||||
{
|
||||
for (auto& info : infos)
|
||||
for (const auto& info : infos)
|
||||
{
|
||||
for (const auto productId : info.purchase.productIds)
|
||||
for (const auto& productId : info.purchase.productIds)
|
||||
{
|
||||
auto idx = findVoiceIndexFromIdentifier (productId);
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ private:
|
|||
havePricesBeenFetched = true;
|
||||
StringArray identifiers;
|
||||
|
||||
for (auto& voiceProduct : voiceProducts)
|
||||
for (const auto& voiceProduct : voiceProducts)
|
||||
identifiers.add (voiceProduct.identifier);
|
||||
|
||||
InAppPurchases::getInstance()->getProductsInformation (identifiers);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue