Skip to content
Snippets Groups Projects

Fix/read variable size matrices and optionals

Merged Fabian Reister requested to merge fix/read-variable-size-matrices-and-optionals into master
3 files
+ 4
4
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -119,7 +119,7 @@ namespace armarx::aron::codegenerator::cpp::generator
block_if_data->addLine(cppAccessor + nextEl() + "resize(" + dims + ".at(0), " + dims + ".at(1));");
}
block_if_data->addLine("assert(" + cppAccessor + nextEl() + "rows() == " + dims + ".at(0) && " + cppAccessor + nextEl() + "cols() == " + dims + ".at(1) && \"Dimensions of member '"+cppAccessor+"' do not match (simox::alg::to_string(dims, ',')). Got (" + cppAccessor + nextEl() + "rows(), " + cppAccessor + nextEl() + "cols()) instead.\");");
block_if_data->addLine("ARMARX_CHECK(" + cppAccessor + nextEl() + "rows() == " + dims + ".at(0) and " + cppAccessor + nextEl() + "cols() == " + dims + ".at(1)) << \"Dimensions of member '"+cppAccessor+"' do not match (simox::alg::to_string(dims, ',')). Got (" + cppAccessor + nextEl() + "rows(), " + cppAccessor + nextEl() + "cols()) instead.\";");
block_if_data->addLine("std::memcpy(reinterpret_cast<unsigned char*>(" + cppAccessor + nextEl() + "data()), "+data+".data(), "+data+".size());");
return resolveMaybeReadBlock(block_if_data, cppAccessor, variantAccessor);
}
Loading