Commit 611d26a9 authored by Benjamin Moir's avatar Benjamin Moir

Added clearscope to a few Dictionary methods

parent b1d6a2a6
......@@ -17,7 +17,7 @@ class Dictionary
private IHashable m_Hasher;
private Array<DictionaryEntry> m_Table;
static Dictionary Create(class keyClass, class valClass, uint initialCapacity = 16)
static clearscope Dictionary Create(class keyClass, class valClass, uint initialCapacity = 16)
{
let dict = new("Dictionary");
......@@ -35,7 +35,7 @@ class Dictionary
return dict;
}
uint Size() { return m_Size; }
clearscope uint Size() { return m_Size; }
void Clear() { m_Size = 0; m_Table.Clear(); }
......@@ -84,7 +84,7 @@ class Dictionary
}
}
bool ContainsKey(Object key)
clearscope bool ContainsKey(Object key)
{
if(!(key is m_KeyClass))
ThrowAbortException("Argument 'key' must be assignable to variable of type '%s'", m_KeyClass.GetClassName());
......@@ -92,7 +92,7 @@ class Dictionary
return GetEntry(key) != null;
}
Object Get(Object key)
clearscope Object Get(Object key)
{
if(!(key is m_KeyClass))
ThrowAbortException("Argument 'key' must be assignable to variable of type '%s'", m_KeyClass.GetClassName());
......@@ -101,7 +101,7 @@ class Dictionary
return entry ? entry.val : null;
}
private DictionaryEntry GetEntry(Object key)
clearscope private DictionaryEntry GetEntry(Object key)
{
uint hash = m_Hasher.GetHash(key);
uint index = hash % m_Table.Size();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment