Handling of CIRCUIT_TEST, should be ready to test.

This commit is contained in:
Adam Ierymenko 2015-10-06 11:47:16 -07:00
parent 57c857e89a
commit 5341afcdcd
3 changed files with 162 additions and 51 deletions

View file

@ -391,6 +391,23 @@ public:
::memmove(_b,_b + at,_l -= at);
}
/**
* Erase something from the middle of the buffer
*
* @param start Starting position
* @param length Length of block to erase
* @throw std::out_of_range Position plus length is beyond size of buffer
*/
inline void erase(const unsigned int at,const unsigned int length)
throw(std::out_of_range)
{
const unsigned int endr = at + length;
if (endr > _l)
throw std::out_of_range("Buffer: erase() range beyond end of buffer");
::memmove(_b + at,_b + endr,_l - endr);
_l -= length;
}
/**
* Set buffer data length to zero
*/