---------------------------------------------------------------------------- {xrst_begin valvector_resize} {xrst_spell valvectors } Resize a valvector ################## Sets the size of this valvector. Prototype ********* {xrst_literal , // BEGIN_RESIZE , // END_RESIZE } Use *** This size of a valvector directly after its :ref:`constructor<
| 277 | */ |
| 278 | // BEGIN_RESIZE |
| 279 | void resize(size_t n) |
| 280 | // END_RESIZE |
| 281 | { assert( n != 0 ); |
| 282 | if( n == size() ) |
| 283 | return; |
| 284 | if( n == 1 ) |
| 285 | vec_.clear(); |
| 286 | else |
| 287 | vec_.resize(n); |
| 288 | } |
| 289 | /* |
| 290 | ---------------------------------------------------------------------------- |
| 291 | {xrst_begin valvector_assign} |
no test coverage detected