sead
Loading...
Searching...
No Matches
seadMemUtilCafe.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
#
include
<
basis
/
seadAssert
.
h
>
4
#
include
<
prim
/
seadPtrUtil
.
h
>
5
6
#
include
<
cafe
.
h
>
7
8
#
include
<
cstring
>
9
10
namespace
sead
{
11
12
inline
void
*
MemUtil
::
fill
(
void
*
addr
,
u8
val
,
size_t
size
)
13
{
14
return
OSBlockSet
(
addr
,
val
,
size
);
15
}
16
17
inline
void
*
MemUtil
::
fillZero
(
void
*
addr
,
size_t
size
)
18
{
19
return
OSBlockSet
(
addr
, 0,
size
);
20
}
21
22
inline
void
*
MemUtil
::
copy
(
void
*
dst
,
const
void
*
src
,
size_t
size
)
23
{
24
SEAD_ASSERT_MSG
(!
PtrUtil
::
isInclude
(
src
,
dst
,
PtrUtil
::
addOffset
(
dst
,
size
))
25
&& !
PtrUtil
::
isInclude
(
dst
,
src
,
PtrUtil
::
addOffset
(
src
,
size
)),
"cross copy area"
);
26
return
OSBlockMove
(
dst
,
src
,
size
, 0);
27
}
28
29
inline
s32
MemUtil
::
compare
(
const
void
*
buf1
,
const
void
*
buf2
,
size_t
size
)
30
{
31
return
std
::
memcmp
(
buf1
,
buf2
,
size
);
32
}
33
34
}
// namespace sead
sead
Definition
seadAssert.h:44
SEAD_ASSERT_MSG
#define SEAD_ASSERT_MSG(condition, format,...)
Definition
seadAssert.h:33
engine
library
include
prim
cafe
seadMemUtilCafe.hpp
Generated by
1.14.0