mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-09-10 14:56:03 +00:00
fix: no C++20 means old school contains()
This commit is contained in:

committed by
Carles Fernandez

parent
f31ad4fc00
commit
a60149cbc7
@@ -126,7 +126,7 @@ void SensorDataAggregator::append_data(const pmt::pmt_t& data_dict)
|
||||
switch (SensorIdentifier::get_internal_type(sensor_id))
|
||||
{
|
||||
case SensorDataType::F32:
|
||||
if (f32_data_.contains(sensor_id))
|
||||
if (f32_data_.find(sensor_id) != f32_data_.end())
|
||||
{
|
||||
f32_data_.at(sensor_id).push_back(SensorDataSample<float>{
|
||||
.rf_sample_stamp = sample_stamp,
|
||||
|
@@ -57,7 +57,7 @@ SensorDataSource::SensorDataSource(
|
||||
|
||||
sensor_data_files_.emplace(id, std::make_shared<SensorDataFile>(file.filename, s_offset, s_period, file.file_offset, file.chunk_size, file.repeat));
|
||||
|
||||
if (not sensor_config_map_.contains(id))
|
||||
if (sensor_config_map_.find(id) == sensor_config_map_.end())
|
||||
{
|
||||
sensor_config_map_[id] = {};
|
||||
}
|
||||
|
@@ -195,7 +195,7 @@ bool SensorDataSourceConfiguration::validate_sensors() const
|
||||
bool ok = true;
|
||||
for (const auto& sensor : sensors_)
|
||||
{
|
||||
if (not files_.contains(sensor.file_id))
|
||||
if (files_.find(sensor.file_id) == files_.end())
|
||||
{
|
||||
DLOG(ERROR) << "Sensor (" << std::to_string(sensor.id) << ") references file (" << std::to_string(sensor.file_id) << "), which does not exist.";
|
||||
ok = false;
|
||||
|
Reference in New Issue
Block a user