MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / swap

Method swap

libCacheSim/dataStructure/sparsepp/spp.h:1255–1266  ·  view source on GitHub ↗

Many STL algorithms use swap instead of copy constructors

Source from the content-addressed store, hash-verified

1253
1254 // Many STL algorithms use swap instead of copy constructors
1255 void swap(sparsegroup& x)
1256 {
1257 using std::swap;
1258
1259 swap(_group, x._group);
1260 swap(_bitmap, x._bitmap);
1261 swap(_bm_erased, x._bm_erased);
1262#ifdef SPP_STORE_NUM_ITEMS
1263 swap(_num_buckets, x._num_buckets);
1264 swap(_num_allocated, x._num_allocated);
1265#endif
1266 }
1267
1268 // It's always nice to be able to clear a table without deallocating it
1269 void clear(allocator_type &alloc, bool erased)

Callers 5

swapMethod · 0.45
swapMethod · 0.45
swapMethod · 0.45
spp.hFile · 0.45
swapFunction · 0.45

Calls 1

swapFunction · 0.70

Tested by

no test coverage detected