MCPcopy Create free account
hub / github.com/buggins/coolreader / erase

Method erase

crengine/include/lvarray.h:149–161  ·  view source on GitHub ↗

removes several items from vector

Source from the content-addressed store, hash-verified

147 }
148 /// removes several items from vector
149 void erase( int pos, int count )
150 {
151#if defined(_DEBUG) && !defined(ANDROID)
152 if ( pos<0 || count<=0 || pos+count > _count )
153 throw;
154#endif
155 int i;
156 for (i=pos+count; i<_count; i++)
157 {
158 _array[i-count] = _array[i];
159 }
160 _count -= count;
161 }
162 T remove( int pos )
163 {
164 T item = _array[ pos ];

Callers 1

prepareWriteMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected