fix: Resolving warnings

This commit is contained in:
Chris Cameron
2021-06-30 11:33:11 -04:00
parent 06f40e5d22
commit 37d799295c
3 changed files with 5 additions and 5 deletions

View File

@@ -151,11 +151,11 @@ namespace ICD.Common.Utils.Collections
return m_Collection.GetEnumerator();
}
void ICollection.CopyTo(Array myArr, int index)
void ICollection.CopyTo(Array array, int index)
{
foreach (TContents item in m_Collection)
{
myArr.SetValue(item, index);
array.SetValue(item, index);
index++;
}
}

View File

@@ -61,9 +61,9 @@ namespace ICD.Common.Utils.Collections
m_Comparer = comparer;
}
public int GetHashCode(WeakKeyReference<T> weakKey)
public int GetHashCode(WeakKeyReference<T> obj)
{
return weakKey.HashCode;
return obj == null ? 0 : obj.HashCode;
}
// Note: There are actually 9 cases to handle here.

View File

@@ -178,7 +178,7 @@ namespace ICD.Common.Utils
if (type == null)
throw new ArgumentNullException("type");
return (T)CreateInstance(type);
return (T)CreateInstance(type, new object[0]);
}
/// <summary>