Sign in
android
/
platform
/
external
/
chromium_org
/
a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7
/
.
/
mojo
/
public
/
bindings
/
generators
/
cpp_templates
/
struct_definition
blob: e69d787ec39786ffc1ca0f01563ca818e83886d7 [
file
] [
log
] [
blame
]
// static
$CLASS
*
$CLASS
::
New
(
mojo
::
Buffer
*
buf
,
mojo
::
Buffer
::
Destructor
dtor
)
{
return
new
(
buf
->
Allocate
(
sizeof
(
$CLASS
),
dtor
))
$CLASS
();
}
$CLASS
::
$CLASS
()
{
_header_
.
num_bytes
=
sizeof
(*
this
);
_header_
.
num_fields
=
$NUM_FIELDS
;
}