Fixes bad expressions, bad bool checks in loops, a few null pointer exceptions, and optimizes constructors.

This commit is contained in:
Kamron Batman 2018-09-15 23:16:45 -07:00
parent 8da55d6043
commit f93c3b992e
62 changed files with 318 additions and 634 deletions

View file

@ -37,14 +37,11 @@ namespace Server
{
Type type = typeof(T);
if (type != null)
{
MethodInfo m = type.GetMethod("Validate", BindingFlags.Instance | BindingFlags.Public);
MethodInfo m = type.GetMethod("Validate", BindingFlags.Instance | BindingFlags.Public);
if (m != null)
for (int i = 0; i < m_Queue.Count; ++i)
m.Invoke(m_Queue[i], null);
}
if (m != null)
for (int i = 0; i < m_Queue.Count; ++i)
m.Invoke(m_Queue[i], null);
m_Queue.Clear();
m_Queue = null;