Skip to content

Commit a7fa225

Browse files
committed
Correct read message count from proto naming.
1 parent 05a2785 commit a7fa225

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

voxblox/include/voxblox/io/layer_io_inl.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ bool LoadBlocksFromFile(
3636
do {
3737
// Get number of messages
3838
uint32_t num_protos;
39-
if (!utils::readProtoMsgCountToStream(&proto_file, &num_protos,
40-
&tmp_byte_offset)) {
39+
if (!utils::readProtoMsgCountFromStream(&proto_file, &num_protos,
40+
&tmp_byte_offset)) {
4141
LOG(ERROR) << "Could not read number of messages.";
4242
return false;
4343
}
@@ -150,8 +150,8 @@ bool LoadLayer(const std::string& file_path, const bool multiple_layer_support,
150150
do {
151151
// Get number of messages
152152
uint32_t num_protos;
153-
if (!utils::readProtoMsgCountToStream(&proto_file, &num_protos,
154-
&tmp_byte_offset)) {
153+
if (!utils::readProtoMsgCountFromStream(&proto_file, &num_protos,
154+
&tmp_byte_offset)) {
155155
LOG(ERROR) << "Could not read number of messages.";
156156
return false;
157157
}

voxblox/include/voxblox/utils/protobuf_utils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
namespace voxblox {
1111

1212
namespace utils {
13-
bool readProtoMsgCountToStream(std::fstream* stream_in, uint32_t* message_count,
14-
uint64_t* byte_offset);
13+
bool readProtoMsgCountFromStream(std::fstream* stream_in,
14+
uint32_t* message_count,
15+
uint64_t* byte_offset);
1516

1617
bool writeProtoMsgCountToStream(uint32_t message_count,
1718
std::fstream* stream_out);

voxblox/src/utils/protobuf_utils.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
namespace voxblox {
88

99
namespace utils {
10-
bool readProtoMsgCountToStream(std::fstream* stream_in, uint32_t* message_count,
11-
uint64_t* byte_offset) {
10+
bool readProtoMsgCountFromStream(std::fstream* stream_in,
11+
uint32_t* message_count,
12+
uint64_t* byte_offset) {
1213
CHECK_NOTNULL(stream_in);
1314
CHECK_NOTNULL(message_count);
1415
CHECK_NOTNULL(byte_offset);

0 commit comments

Comments
 (0)