MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / set_size

Method set_size

benchmarks/dlib/array/array_kernel.h:379–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377 typename mem_manager
378 >
379 void array<T,mem_manager>::
380 set_size (
381 size_t size
382 )
383 {
384 // make sure requires clause is not broken
385 DLIB_CASSERT(( size <= this->max_size() ),
386 "\tvoid array::set_size"
387 << "\n\tsize must be <= max_size()"
388 << "\n\tsize: " << size
389 << "\n\tmax size: " << this->max_size()
390 << "\n\tthis: " << this
391 );
392
393 reset();
394 array_size = size;
395 if (size > 0)
396 last_pos = array_elements + size - 1;
397 else
398 last_pos = 0;
399 }
400
401// ----------------------------------------------------------------------------------------
402

Callers

nothing calls this directly

Calls 1

max_sizeMethod · 0.95

Tested by

no test coverage detected