Fixed some errors from analyzer

This commit is contained in:
hondacrx
2017-06-22 17:02:27 -04:00
parent 0e40e90a11
commit d538acc979
26 changed files with 38 additions and 46 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ namespace Framework.Configuration
foreach (var line in ConfigContent)
{
lineCounter++;
if (line.StartsWith("#") || line.StartsWith("-") || string.IsNullOrEmpty(line))
if (string.IsNullOrEmpty(line) || line.StartsWith("#") || line.StartsWith("-"))
continue;
var configOption = new StringArray(line, '=');
-2
View File
@@ -50,8 +50,6 @@ namespace Framework.Cryptography
public void Initialize(byte[] sessionKey, byte[] serverSeed, byte[] clientSeed)
{
IsInitialized = false;
if (IsInitialized)
throw new InvalidOperationException("PacketCrypt already initialized!");
+1 -1
View File
@@ -51,7 +51,7 @@ namespace Framework.Database
Log.outInfo(LogFilter.ServerLoading, "Database \"{0}\" does not exist, do you want to create it? [yes (default) / no]: ", name);
string answer = Console.ReadLine();
if (string.IsNullOrEmpty(answer) && answer[0] != 'y')
if (string.IsNullOrEmpty(answer) || answer[0] != 'y')
return false;
Log.outInfo(LogFilter.ServerLoading, "Creating database \"{0}\"...", name);
+1 -2
View File
@@ -482,8 +482,7 @@ namespace Framework.Dynamic
public void ModifyIf(Func<Task, bool> filter)
{
List<Task> cache = new List<Task>();
container.Where(filter);
foreach (var task in container.ToList())
foreach (var task in container.Where(filter))
{
if (filter(task))
{
+5 -5
View File
@@ -131,12 +131,12 @@ namespace Framework.GameMath
vertices[0] = _lo;
vertices[1] = new Vector3(_hi.X, _lo.Y, _lo.Z);
vertices[2] = new Vector3(_hi.X, _hi.Y, _lo.Z);
vertices[4] = new Vector3(_lo.X, _hi.Y, _lo.Z);
vertices[3] = new Vector3(_lo.X, _hi.Y, _lo.Z);
vertices[5] = new Vector3(_lo.X, _lo.Y, _hi.Z);
vertices[6] = new Vector3(_hi.X, _lo.Y, _hi.Z);
vertices[7] = _hi;
vertices[8] = new Vector3(_lo.X, _hi.Y, _hi.Z);
vertices[4] = new Vector3(_lo.X, _lo.Y, _hi.Z);
vertices[5] = new Vector3(_hi.X, _lo.Y, _hi.Z);
vertices[6] = _hi;
vertices[7] = new Vector3(_lo.X, _hi.Y, _hi.Z);
return vertices;
}
+1 -1
View File
@@ -26,7 +26,7 @@ public class Realm : IEquatable<Realm>
{
Name = name;
NormalizedName = name;
NormalizedName.Replace(" ", "");
NormalizedName = NormalizedName.Replace(" ", "");
}
public IPEndPoint GetAddressForClient(IPAddress clientAddr)