Skip to content

Commit a6a0548

Browse files
committed
vtd: Fix use of protobuf deprecated function use ByteSize
1 parent 3dc3236 commit a6a0548

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

optional/vtd/src/osi_omni_sensor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ void OsiOmniSensor::process(osi3::SensorData* osi_sd, cloe::Duration& sim_time)
392392
return;
393393
}
394394

395-
if (osi_sd->ByteSize() == 0) {
395+
if (osi_sd->ByteSizeLong() == 0) {
396396
return;
397397
}
398398

@@ -486,7 +486,7 @@ void OsiOmniSensor::process(osi3::SensorData* osi_sd, cloe::Duration& sim_time)
486486
}
487487

488488
void OsiOmniSensor::process(const osi3::SensorView& osi_sv) {
489-
if (osi_sv.ByteSize() == 0) {
489+
if (osi_sv.ByteSizeLong() == 0) {
490490
return;
491491
}
492492

optional/vtd/src/osi_transceiver_tcp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ std::shared_ptr<osi3::SensorData> OsiTransceiverTcp::receive_sensor_data_wait()
8888
free(data_buf);
8989

9090
// 5. Consistency checks.
91-
if (sensor_data_rcv->ByteSize() != static_cast<int>(data_size)) {
91+
if (sensor_data_rcv->ByteSizeLong() != static_cast<int>(data_size)) {
9292
this->num_errors_++;
9393
throw OsiError("OsiTransceiverTcp: inconsistent data size in osi protobuf message");
9494
}

optional/vtd/src/vtd_osi_test.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,6 @@ TEST(vtd_osi, osi_sensor) {
125125
// Initialize detected objects.
126126
init_osi_detected_objects(data, vehicles);
127127

128-
ASSERT_GT(data->ByteSize(), 0);
128+
ASSERT_GT(data->ByteSizeLong(), 0);
129129
ASSERT_NO_THROW(sensor.process(data, sim_time));
130130
}

0 commit comments

Comments
 (0)