Skip to content
Snippets Groups Projects
Commit 49d6a64d authored by Fabian Reister's avatar Fabian Reister
Browse files

aron code generation: replacing c-style int conversion

parent 624b80de
No related branches found
No related tags found
No related merge requests found
......@@ -76,8 +76,8 @@ namespace armarx::aron::codegenerator::cpp::generator
std::string escaped_accessor = EscapeAccessor(cppAccessor);
variantAccessor = ARON_VARIANT_RETURN_ACCESSOR + "_" + escaped_accessor;
b->addLine("auto " + variantAccessor + " = " + ARON_WRITER_ACCESSOR +
".writeMatrix((int) " + std::to_string(type.getRows()) + ", " + "(int) " +
std::to_string(type.getCols()) + ", " +
".writeMatrix(static_cast<int>( " + std::to_string(type.getRows()) + "), " + "static_cast<int>( " +
std::to_string(type.getCols()) + "), " +
std::get<2>(ElementType2Cpp.at(type.getElementType())) + ", " +
conversion::Maybe2CppString.at(type.getMaybe()) + ", " + "armarx::aron::Path(" +
ARON_PATH_ACCESSOR + ", {" + simox::alg::join(p.getPath(), ", ") +
......@@ -96,8 +96,8 @@ namespace armarx::aron::codegenerator::cpp::generator
variantAccessor = ARON_VARIANT_RETURN_ACCESSOR + "_" + escaped_accessor;
block_if_data->addLine(
variantAccessor + " = " + ARON_WRITER_ACCESSOR + ".writeNDArray({(int) " + cppAccessor +
nextEl() + "rows(), " + "(int) " + cppAccessor + nextEl() + "cols(), " +
variantAccessor + " = " + ARON_WRITER_ACCESSOR + ".writeNDArray({static_cast<int>( " + cppAccessor +
nextEl() + "rows() ), " + "static_cast<int>( " + cppAccessor + nextEl() + "cols()), " +
std::to_string(std::get<1>(ElementType2Cpp.at(type.getElementType()))) + "}, " + "\"" +
std::get<0>(ElementType2Cpp.at(type.getElementType())) + "\", " +
"reinterpret_cast<const unsigned char*>(" + cppAccessor + nextEl() + "data()), " +
......
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