Skip to content
Snippets Groups Projects
Commit 1f173728 authored by Fabian Tërnava's avatar Fabian Tërnava
Browse files

fix missing type

parent aea2802e
No related branches found
No related tags found
No related merge requests found
Pipeline #16841 failed
......@@ -73,11 +73,11 @@ namespace armarx::aron::codegenerator::cpp::generator
{
return {{{name, getInstantiatedCppTypename() + "::Identity()"}}, true};
}
if (type.getDefaultValue() == aron::type::matrix::default_value::DEFAULT || type.getDefaultValue() == aron::type::matrix::default_value::ZEROS)
else if (type.getDefaultValue() == aron::type::matrix::default_value::DEFAULT || type.getDefaultValue() == aron::type::matrix::default_value::ZEROS)
{
return {{{name, getInstantiatedCppTypename() + "::Zero()"}}, true};
}
if (type.getDefaultValue() == aron::type::matrix::default_value::ONES)
else if (type.getDefaultValue() == aron::type::matrix::default_value::ONES)
{
return {{{name, getInstantiatedCppTypename() + "::One()"}}, true};
}
......@@ -98,18 +98,18 @@ namespace armarx::aron::codegenerator::cpp::generator
{
block_if_data->addLine(cppAccessor + " = " + getInstantiatedCppTypename() + "::Identity();");
}
if (type.getDefaultValue() == aron::type::matrix::default_value::DEFAULT || type.getDefaultValue() == aron::type::matrix::default_value::ZEROS)
else if (type.getDefaultValue().empty() || type.getDefaultValue() == aron::type::matrix::default_value::DEFAULT || type.getDefaultValue() == aron::type::matrix::default_value::ZEROS)
{
block_if_data->addLine(cppAccessor + " = " + getInstantiatedCppTypename() + "::Zero();");
}
if (type.getDefaultValue() == aron::type::matrix::default_value::ONES)
else if (type.getDefaultValue() == aron::type::matrix::default_value::ONES)
{
block_if_data->addLine(cppAccessor + " = " + getInstantiatedCppTypename() + "::One();");
}
else
else if (not type.getDefaultValue().empty())
{
// try to parse num. We ensure from typereader that defaultValue is valid number
block_if_data->addLine(cppAccessor + " = " + "::One() * " + type.getDefaultValue() + ";");
block_if_data->addLine(cppAccessor + " = " + getInstantiatedCppTypename() + "::One() * " + type.getDefaultValue() + ";");
}
return resolveMaybeResetHardBlock(block_if_data, cppAccessor);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment