Introduce mjtBool for boolean types.

PiperOrigin-RevId: 920201340
Change-Id: I3b19c11a00357e06a1df08b8819832955c37f9ff
This commit is contained in:
Yuval Tassa
2026-05-23 09:13:21 -07:00
committed by Copybara-Service
parent 466d068089
commit 7667e7110e
7 changed files with 34 additions and 12 deletions
+1
View File
@@ -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,
+1 -1
View File
@@ -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}"