Fixed some errors from analyzer
This commit is contained in:
@@ -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, '=');
|
||||
|
||||
@@ -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!");
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Realm : IEquatable<Realm>
|
||||
{
|
||||
Name = name;
|
||||
NormalizedName = name;
|
||||
NormalizedName.Replace(" ", "");
|
||||
NormalizedName = NormalizedName.Replace(" ", "");
|
||||
}
|
||||
|
||||
public IPEndPoint GetAddressForClient(IPAddress clientAddr)
|
||||
|
||||
Reference in New Issue
Block a user