MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / assign

Function assign

modules/core/base/include/SkrBase/memory/memory_ops.hpp:50–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49template <typename Dst, typename Src>
50SKR_INLINE void assign(Dst* dst, Src* src)
51{
52 if ((void*)dst != (void*)src)
53 {
54 if constexpr (MemoryTraits<Dst, Src>::use_assign)
55 {
56 *dst = *src;
57 }
58 else
59 {
60 static_assert(sizeof(Dst) == sizeof(Src));
61 std::memcpy(dst, src, sizeof(Src));
62 }
63 }
64}
65
66// move copy & move assign
67template <typename Dst, typename Src>

Callers 15

sweak_ptr.hppFile · 0.85
operator=Method · 0.85
add_exMethod · 0.85
assignMethod · 0.85
add_exMethod · 0.85
assignMethod · 0.85
StaticWorldStateClass · 0.85
fixed_slistMethod · 0.85
fixed_slist.hFile · 0.85
string.hFile · 0.85
weak_ptrClass · 0.85
operator=Method · 0.85

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected