Function operator=

Summary

#include <include/flecs/addons/cpp/mixins/snapshot/impl.hpp>

(1) snapshot & operator=(const snapshot &obj)

(2) snapshot & operator=(snapshot &&obj)

Function overload

Synopsis

#include <include/flecs/addons/cpp/mixins/snapshot/impl.hpp>

snapshot & operator=(const snapshot &obj)

Description

No description yet.

Source

Lines 24-29 in include/flecs/addons/cpp/mixins/snapshot/impl.hpp.

snapshot& operator=(const snapshot& obj) {
    ecs_assert(m_world.c_ptr() == obj.m_world.c_ptr(), ECS_INVALID_PARAMETER, NULL);
    ecs_iter_t it = ecs_snapshot_iter(obj.m_snapshot);
    m_snapshot = ecs_snapshot_take_w_iter(&it);        
    return *this;
}

Synopsis

#include <include/flecs/addons/cpp/mixins/snapshot/impl.hpp>

snapshot & operator=(snapshot &&obj)

Description

No description yet.

Source

Lines 31-36 in include/flecs/addons/cpp/mixins/snapshot/impl.hpp.

snapshot& operator=(snapshot&& obj) {
    ecs_assert(m_world.c_ptr() == obj.m_world.c_ptr(), ECS_INVALID_PARAMETER, NULL);
    m_snapshot = obj.m_snapshot;
    obj.m_snapshot = nullptr;
    return *this;
}