* Removes the specified index from the array. * * @param index The index. */
| 165 | * @param index The index. |
| 166 | */ |
| 167 | void Array::Remove(SizeType index) |
| 168 | { |
| 169 | ObjectLock olock(this); |
| 170 | |
| 171 | if (m_Frozen) |
| 172 | BOOST_THROW_EXCEPTION(std::invalid_argument("Array must not be modified.")); |
| 173 | |
| 174 | if (index >= m_Data.size()) |
| 175 | BOOST_THROW_EXCEPTION(std::invalid_argument("Index to remove must be within bounds.")); |
| 176 | |
| 177 | m_Data.erase(m_Data.begin() + index); |
| 178 | } |
| 179 | |
| 180 | /** |
| 181 | * Removes the item specified by the iterator from the array. |
no test coverage detected