Function swap

Synopsis

#include <src/entt/entity/sparse_set.hpp>

void swap(basic_sparse_set &other)

Description

Exchanges the contents with those of a given sparse set.

Parameters

other - Sparse set to exchange the content with.

Source

Lines 388-395 in src/entt/entity/sparse_set.hpp.

void swap(basic_sparse_set &other) {
    using std::swap;
    swap(sparse, other.sparse);
    swap(packed, other.packed);
    swap(info, other.info);
    swap(free_list, other.free_list);
    swap(mode, other.mode);
}





Add Discussion

Log in to comment