Skip to content

Commit

Permalink
Fix build warnings (#32122)
Browse files Browse the repository at this point in the history
  • Loading branch information
nxtn authored Feb 11, 2020
1 parent b89b7c6 commit f5d7130
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public static void UpdateReferences()
if (OAr[j] != null)
{
int pos = Rand.Next(0, weakList.Count);
if (weakList[pos] != null && weakList[pos].IsAllocated)
if (weakList[pos].IsAllocated)
{
OAr[j] = weakList[pos].Target;
}
Expand Down Expand Up @@ -360,7 +360,7 @@ public static void CleanupWeakReferenceArr()
{
for (int k = weakList.Count - 1; k >= 0; k--)
{
if (weakList[k] == null || !(weakList[k].IsAllocated))
if (!weakList[k].IsAllocated)
{
weakList.RemoveAt(k);
}
Expand Down Expand Up @@ -442,7 +442,7 @@ public static void AddRefFrom(Object from)
while (!found)
{
pos = Rand.Next(0, weakList.Count);
if (weakList[pos] == null || !weakList[pos].IsAllocated)
if (!weakList[pos].IsAllocated)
continue;
if (weakList[pos].Target != null)
{
Expand All @@ -460,7 +460,7 @@ public static void AddRefTo(Object to)
while (!found)
{
pos = Rand.Next(0, weakList.Count);
if (weakList[pos] == null || !weakList[pos].IsAllocated)
if (!weakList[pos].IsAllocated)
continue;
if (weakList[pos].Target != null)
{
Expand Down Expand Up @@ -498,7 +498,7 @@ public static Object AddObject(int size, List<Object> Arr)
found = false;
for (int i = 0; i < weakList.Count; i++)
{
if (weakList[i] == null || !weakList[i].IsAllocated)
if (!weakList[i].IsAllocated)
{
weakList[i] = GCHandle.Alloc(o, GCHandleType.Weak);
found = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public static void UpdateReferences()
if (OAr[j] != null)
{
int pos = Rand.Next(0, weakList.Count);
if (weakList[pos] != null && weakList[pos].IsAllocated)
if (weakList[pos].IsAllocated)
{
OAr[j] = weakList[pos].Target;
}
Expand Down Expand Up @@ -384,7 +384,7 @@ public static void CleanupWeakReferenceArr()
{
for (int k = weakList.Count - 1; k >= 0; k--)
{
if (weakList[k] == null || !(weakList[k].IsAllocated))
if (!weakList[k].IsAllocated)
{
weakList.RemoveAt(k);
}
Expand Down Expand Up @@ -467,7 +467,7 @@ public static void AddRefFrom(Object from)
while (!found)
{
pos = Rand.Next(0, weakList.Count);
if (weakList[pos] == null || !weakList[pos].IsAllocated)
if (!weakList[pos].IsAllocated)
continue;
if (weakList[pos].Target != null)
{
Expand All @@ -485,7 +485,7 @@ public static void AddRefTo(Object to)
while (!found)
{
pos = Rand.Next(0, weakList.Count);
if (weakList[pos] == null || !weakList[pos].IsAllocated)
if (!weakList[pos].IsAllocated)
continue;
if (weakList[pos].Target != null)
{
Expand Down Expand Up @@ -523,7 +523,7 @@ public static Object AddObject(int size, List<Object> Arr)
found = false;
for (int i = 0; i < weakList.Count; i++)
{
if (weakList[i] == null || !weakList[i].IsAllocated)
if (!weakList[i].IsAllocated)
{
weakList[i] = GCHandle.Alloc(o, GCHandleType.Weak);
found = true;
Expand Down

0 comments on commit f5d7130

Please sign in to comment.