Cleanup with resharper (mostly removing redundancies & using collection.Length/Count properties instead of the Count method)

This commit is contained in:
Regalis
2016-10-31 20:35:04 +02:00
parent 5cc605bc01
commit eb2c51c2f1
46 changed files with 93 additions and 200 deletions

View File

@@ -180,7 +180,7 @@ namespace Barotrauma
{
base.Move(amount);
for (int i = 0; i < sections.Count(); i++)
for (int i = 0; i < sections.Length; i++)
{
Rectangle r = sections[i].rect;
r.X += (int)amount.X;
@@ -867,7 +867,7 @@ namespace Barotrauma
(int)(rect.Y - Submarine.HiddenSubPosition.Y) + "," +
rect.Width + "," + rect.Height));
for (int i = 0; i < sections.Count(); i++)
for (int i = 0; i < sections.Length; i++)
{
if (sections[i].damage == 0.0f) continue;
@@ -985,7 +985,7 @@ namespace Barotrauma
// int sectionCount = message.ReadByte();
for (int i = 0; i<sections.Count(); i++)
for (int i = 0; i<sections.Length; i++)
{
//byte sectionIndex = message.ReadByte();
float damage = message.ReadRangedSingle(0.0f, 1.0f, 8) * Health;