MCPcopy Create free account
hub / github.com/davisking/dlib / pop_back

Method pop_back

dlib/array/array_kernel.h:716–731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

714 typename mem_manager
715 >
716 void array<T,mem_manager>::
717 pop_back (
718 T& item
719 )
720 {
721 // make sure requires clause is not broken
722 DLIB_ASSERT( this->size() > 0 ,
723 "\tvoid array::pop_back()"
724 << "\n\tsize() must be bigger than 0"
725 << "\n\tsize(): " << this->size()
726 << "\n\tthis: " << this
727 );
728
729 exchange(item,(*this)[this->size()-1]);
730 this->set_size(this->size()-1);
731 }
732
733// ----------------------------------------------------------------------------------------
734

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.95
exchangeFunction · 0.85
set_sizeMethod · 0.45

Tested by

no test coverage detected