Introduce mjtBool for boolean types.
PiperOrigin-RevId: 920201340 Change-Id: I3b19c11a00357e06a1df08b8819832955c37f9ff
This commit is contained in:
committed by
Copybara-Service
parent
466d068089
commit
7667e7110e
@@ -24,6 +24,7 @@ PRIMITIVE_TYPES: Set[str] = {
|
||||
"float",
|
||||
"int",
|
||||
"mjtByte",
|
||||
"mjtBool",
|
||||
"mjtMeshBuiltin",
|
||||
"mjtNum",
|
||||
"mjtObj", # Adding this to the primitives because it is used as int,
|
||||
|
||||
@@ -148,7 +148,7 @@ def get_param_string(p: ast_nodes.FunctionParameterDecl) -> str:
|
||||
return f"const String& {p.name}"
|
||||
elif (
|
||||
p.type.inner_type.name
|
||||
in ["int", "float", "double", "mjtNum", "mjtByte"]
|
||||
in ["int", "float", "double", "mjtNum", "mjtByte", "mjtBool"]
|
||||
and p.type.inner_type.is_const
|
||||
):
|
||||
return f"const NumberArray& {p.name}"
|
||||
|
||||
Reference in New Issue
Block a user