diff options
author | Maximilian Stiefel <stiefel.maximilian@online.de> | 2018-03-17 13:46:07 +0100 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-03-22 23:35:40 +0100 |
commit | f5d9d86bae8ed97a43a4501236daa4a34d54dcc0 (patch) | |
tree | f169e31221c33720de00ee580caa55fa01c0d0e0 /gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc | |
parent | 38b6d3216652fcf329babfe81bdd5bfde1c4afef (diff) |
Solved the issue without C++11 and introduced the proposed improvements. Fixes #1648
Diffstat (limited to 'gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc')
-rw-r--r-- | gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc index 7635efeea5..7df2caeb3b 100644 --- a/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc +++ b/gr-digital/lib/ofdm_carrier_allocator_cvc_impl.cc @@ -1,6 +1,6 @@ /* -*- c++ -*- */ /* - * Copyright 2013-2018 Free Software Foundation, Inc. + * Copyright 2013, 2018 Free Software Foundation, Inc. * * This file is part of GNU Radio * @@ -74,9 +74,8 @@ namespace gr { d_output_is_shifted(output_is_shifted) { // Sanity checks - // Since C++11: Get pointer to underlying array // If that is is null, the input is wrong -> force user to use ((),) in python - if (d_occupied_carriers.data() == nullptr) { + if (d_occupied_carriers.empty()) { throw std::invalid_argument("Occupied carriers must be of type vector of vector i.e. ((),)."); } for (unsigned i = 0; i < d_occupied_carriers.size(); i++) { @@ -92,7 +91,7 @@ namespace gr { } } } - if (d_pilot_carriers.data() == nullptr) { + if (d_pilot_carriers.empty()) { throw std::invalid_argument("Pilot carriers must be of type vector of vector i.e. ((),)."); } for (unsigned i = 0; i < d_pilot_carriers.size(); i++) { @@ -108,7 +107,7 @@ namespace gr { } } } - if (d_pilot_symbols.data() == nullptr) { + if (d_pilot_symbols.empty()) { throw std::invalid_argument("Pilot symbols must be of type vector of vector i.e. ((),)."); } for (unsigned i = 0; i < std::max(d_pilot_carriers.size(), d_pilot_symbols.size()); i++) { |