Added const to Array.GetSize(), and to 3 Node methods.

This commit is contained in:
Aaron Burghardt
2014-08-16 17:48:45 -04:00
committed by Nikias Bassen
parent ccd6f05fe1
commit b6c43e901c
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -141,9 +141,9 @@ void Array::Remove(unsigned int pos)
_array.erase(it);
}
unsigned int Array::GetNodeIndex(Node* node)
unsigned int Array::GetNodeIndex(Node* node) const
{
std::vector<Node*>::iterator it = std::find(_array.begin(), _array.end(), node);
std::vector<Node*>::const_iterator it = std::find(_array.begin(), _array.end(), node);
return std::distance (_array.begin(), it);
}