Skip to content

Commit

Permalink
simple code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Dec 3, 2024
1 parent 8be475c commit dc87e75
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/libYARP_dev/src/yarp/dev/MapGrid2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -953,21 +953,21 @@ bool MapGrid2D::write(yarp::os::ConnectionWriter& connection) const
{
connection.appendInt32(BOTTLE_TAG_LIST);
connection.appendInt32(10);
connection.appendInt32(BOTTLE_TAG_INT32);
connection.appendInt32(BOTTLE_TAG_INT32); //1
connection.appendInt32(m_width);
connection.appendInt32(BOTTLE_TAG_INT32);
connection.appendInt32(BOTTLE_TAG_INT32); //2
connection.appendInt32(m_height);
connection.appendInt32(BOTTLE_TAG_FLOAT64);
connection.appendInt32(BOTTLE_TAG_FLOAT64); // 3
connection.appendFloat64(m_origin.get_x());
connection.appendInt32(BOTTLE_TAG_FLOAT64);
connection.appendInt32(BOTTLE_TAG_FLOAT64); // 4
connection.appendFloat64(m_origin.get_y());
connection.appendInt32(BOTTLE_TAG_FLOAT64);
connection.appendInt32(BOTTLE_TAG_FLOAT64); // 5
connection.appendFloat64(m_origin.get_theta());
connection.appendInt32(BOTTLE_TAG_FLOAT64);
connection.appendInt32(BOTTLE_TAG_FLOAT64); // 6
connection.appendFloat64(m_resolution);
connection.appendInt32(BOTTLE_TAG_STRING);
connection.appendInt32(BOTTLE_TAG_STRING); // 7
connection.appendString(m_map_name);
connection.appendInt32(BOTTLE_TAG_INT8);
connection.appendInt32(BOTTLE_TAG_INT8); // 8
connection.appendInt8(m_compressed_data_over_network);

if (m_compressed_data_over_network)
Expand All @@ -980,7 +980,7 @@ bool MapGrid2D::write(yarp::os::ConnectionWriter& connection) const
unsigned char* dataCompressed = new unsigned char[sizeCompressed];
int z_result = compress((Bytef*)dataCompressed, (uLongf*)&sizeCompressed, (Bytef*)dataUncompressed, sizeUncompressed);
YARP_UNUSED(z_result);
connection.appendInt32(BOTTLE_TAG_BLOB);
connection.appendInt32(BOTTLE_TAG_BLOB); // 9
connection.appendInt32(sizeCompressed);
connection.appendBlock((char*)dataCompressed, sizeCompressed);
delete [] dataCompressed;
Expand All @@ -992,7 +992,7 @@ bool MapGrid2D::write(yarp::os::ConnectionWriter& connection) const
unsigned char* dataCompressed = new unsigned char[sizeCompressed];
int z_result = compress((Bytef*)dataCompressed, (uLongf*)&sizeCompressed, (Bytef*)dataUncompressed, sizeUncompressed);
YARP_UNUSED(z_result);
connection.appendInt32(BOTTLE_TAG_BLOB);
connection.appendInt32(BOTTLE_TAG_BLOB); // 10
connection.appendInt32(sizeCompressed);
connection.appendBlock((char*)dataCompressed, sizeCompressed);
delete[] dataCompressed;
Expand Down

0 comments on commit dc87e75

Please sign in to comment.