MCPcopy Create free account
hub / github.com/dengwirda/jigsaw / set_count

Method set_count

src/libcpp/containers/block_array.hpp:559–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

557 */
558
559 __inline_call void_type set_count ( // _def-construct
560 size_type _new_count ,
561 __cont::alloc_types _new_alloc =
562 __cont::loose_alloc
563 )
564 {
565 /*----- manipulate the ctor'd range within the buffer */
566 size_type _cur_count = count() ;
567 if(_new_count > _cur_count)
568 {
569 inc_count(
570 _new_count - _cur_count, _new_alloc) ;
571 }
572 else
573 if(_new_count <=_cur_count)
574 {
575 dec_count(
576 _cur_count - _new_count, _new_alloc) ;
577 }
578 }
579
580 __inline_call void_type set_count ( // copy-construct
581 size_type _new_count ,

Callers 3

set_allocMethod · 0.45
inc_countMethod · 0.45
dec_countMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected