mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-11 12:53:10 +00:00
Apply fixes by clang-tidy
This commit is contained in:
@@ -75,10 +75,10 @@ bool get_ad9361_stream_dev(struct iio_context *ctx, enum iodev d, struct iio_dev
|
||||
{
|
||||
case TX:
|
||||
*dev = iio_context_find_device(ctx, "cf-ad9361-dds-core-lpc");
|
||||
return *dev != NULL;
|
||||
return *dev != nullptr;
|
||||
case RX:
|
||||
*dev = iio_context_find_device(ctx, "cf-ad9361-lpc");
|
||||
return *dev != NULL;
|
||||
return *dev != nullptr;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ bool get_ad9361_stream_ch(struct iio_context *ctx __attribute__((unused)), enum
|
||||
name << chid;
|
||||
*chn = iio_device_find_channel(dev, name.str().c_str(), d == TX);
|
||||
}
|
||||
return *chn != NULL;
|
||||
return *chn != nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -115,14 +115,14 @@ bool get_phy_chan(struct iio_context *ctx, enum iodev d, int chid, struct iio_ch
|
||||
name << "voltage";
|
||||
name << chid;
|
||||
*chn = iio_device_find_channel(get_ad9361_phy(ctx), name.str().c_str(), false);
|
||||
return *chn != NULL;
|
||||
return *chn != nullptr;
|
||||
break;
|
||||
case TX:
|
||||
name.str("");
|
||||
name << "voltage";
|
||||
name << chid;
|
||||
*chn = iio_device_find_channel(get_ad9361_phy(ctx), name.str().c_str(), true);
|
||||
return *chn != NULL;
|
||||
return *chn != nullptr;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
@@ -138,10 +138,10 @@ bool get_lo_chan(struct iio_context *ctx, enum iodev d, struct iio_channel **chn
|
||||
// LO chan is always output, i.e. true
|
||||
case RX:
|
||||
*chn = iio_device_find_channel(get_ad9361_phy(ctx), "altvoltage0", true);
|
||||
return *chn != NULL;
|
||||
return *chn != nullptr;
|
||||
case TX:
|
||||
*chn = iio_device_find_channel(get_ad9361_phy(ctx), "altvoltage1", true);
|
||||
return *chn != NULL;
|
||||
return *chn != nullptr;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ bool get_lo_chan(struct iio_context *ctx, enum iodev d, struct iio_channel **chn
|
||||
/* applies streaming configuration through IIO */
|
||||
bool cfg_ad9361_streaming_ch(struct iio_context *ctx, struct stream_cfg *cfg, enum iodev type, int chid)
|
||||
{
|
||||
struct iio_channel *chn = NULL;
|
||||
struct iio_channel *chn = nullptr;
|
||||
|
||||
// Configure phy and lo channels
|
||||
//LOG(INFO)<<"* Acquiring AD9361 phy channel"<<chid;
|
||||
|
||||
Reference in New Issue
Block a user