Skip to content

Commit 954d167

Browse files
committed
why
1 parent aa8dae3 commit 954d167

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PlayLayer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class $modify(MyPlayLayer, PlayLayer) {
9393
void togglePracticeMode(bool practiceMode) {
9494
PlayLayer::togglePracticeMode(practiceMode);
9595
manager->lastDeathPercent = -10.f;
96-
for (auto [coin, collected] : manager->coins) {
96+
for (auto &[coin, collected] : manager->coins) {
9797
collected = false;
9898
}
9999
if (!manager->channel) return;
@@ -102,7 +102,7 @@ class $modify(MyPlayLayer, PlayLayer) {
102102
void resetLevelFromStart() {
103103
PlayLayer::resetLevelFromStart();
104104
manager->lastDeathPercent = -10.f;
105-
for (auto [coin, collected] : manager->coins) {
105+
for (auto &[coin, collected] : manager->coins) {
106106
collected = false;
107107
}
108108
if (!manager->channel) return;
@@ -254,7 +254,7 @@ class $modify(MyPlayLayer, PlayLayer) {
254254

255255
std::string formattedCoinString = "Coins: ";
256256
int index = 0;
257-
for (auto [coin, collected] : manager->coins) {
257+
for (auto &[coin, collected] : manager->coins) {
258258
index++;
259259
formattedCoinString += collected ? collectedEmoji : uncollectedEmoji;
260260
if (index != manager->coins.size()) formattedCoinString += " ";

0 commit comments

Comments
 (0)