浏览代码

Fixed infinite loop

Ivan Savenko 3 年之前
父节点
当前提交
55d0f0ad9f
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      client/battle/BattleProjectileController.cpp

+ 1 - 2
client/battle/BattleProjectileController.cpp

@@ -225,9 +225,8 @@ void BattleProjectileController::emitStackProjectile(const CStack * stack)
 
 void BattleProjectileController::showProjectiles(Canvas & canvas)
 {
-	for ( auto it = projectiles.begin(); it != projectiles.end();)
+	for ( auto projectile: projectiles)
 	{
-		auto projectile = *it;
 		if ( projectile->playing )
 			projectile->show(canvas);
 	}