(svn r26238) -Codechange: Use StringParameters::GetDataLeft to check for left space in the param array.

This commit is contained in:
frosch
2014-01-12 17:59:43 +00:00
parent bc86bf9b12
commit 5ab39cc651
2 changed files with 9 additions and 3 deletions

View File

@@ -56,7 +56,7 @@ public:
offset(0),
num_param(size)
{
assert(size <= parent.num_param - parent.offset);
assert(size <= parent.GetDataLeft());
if (parent.type == NULL) {
this->type = NULL;
} else {
@@ -89,6 +89,12 @@ public:
return &this->data[this->offset];
}
/** Return the amount of elements which can still be read. */
uint GetDataLeft() const
{
return this->num_param - this->offset;
}
/** Get a pointer to a specific element in the data array. */
uint64 *GetPointerToOffset(uint offset) const
{