summaryrefslogtreecommitdiff
path: root/gr-uhd
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-10-06 09:25:59 -0400
committerTom Rondeau <tom@trondeau.com>2014-10-06 09:25:59 -0400
commit81839787238b9d2b9ffb65c58fccf1ae861c80ff (patch)
tree5bf01a735fe9aea0bbfa9a02de88f2ea98a72356 /gr-uhd
parentf2de4f79a1b042876e6535d34aa104340f2fb45d (diff)
Removing use of 'and', 'or', and 'not' for &&, ||, and !.
Diffstat (limited to 'gr-uhd')
-rw-r--r--gr-uhd/lib/usrp_sink_impl.cc16
-rw-r--r--gr-uhd/lib/usrp_source_impl.cc4
2 files changed, 10 insertions, 10 deletions
diff --git a/gr-uhd/lib/usrp_sink_impl.cc b/gr-uhd/lib/usrp_sink_impl.cc
index 20f6fd6237..1a17e87775 100644
--- a/gr-uhd/lib/usrp_sink_impl.cc
+++ b/gr-uhd/lib/usrp_sink_impl.cc
@@ -589,7 +589,7 @@ namespace gr {
#endif
//if using length_tags, decrement items left to send by the number of samples sent
- if(not pmt::is_null(_length_tag_key) and _nitems_to_send > 0) {
+ if(not pmt::is_null(_length_tag_key) && _nitems_to_send > 0) {
_nitems_to_send -= long(num_sent);
}
@@ -597,7 +597,7 @@ namespace gr {
_metadata.time_spec += ::uhd::time_spec_t(0, num_sent, _sample_rate);
// Some post-processing tasks if we actually transmitted the entire burst
- if (not _pending_cmds.empty() and num_sent == size_t(ninput_items)) {
+ if (not _pending_cmds.empty() && num_sent == size_t(ninput_items)) {
GR_LOG_DEBUG(d_debug_logger, boost::format("Executing %d pending commands.") % _pending_cmds.size());
BOOST_FOREACH(const pmt::pmt_t &cmd_pmt, _pending_cmds) {
msg_handler_command(cmd_pmt);
@@ -669,7 +669,7 @@ namespace gr {
}
//set the start of burst flag in the metadata; ignore if length_tag_key is not null
- else if(pmt::is_null(_length_tag_key) and pmt::equal(key, SOB_KEY)) {
+ else if(pmt::is_null(_length_tag_key) && pmt::equal(key, SOB_KEY)) {
if (my_tag.offset != samp0_count) {
max_count = my_tag_count;
break;
@@ -680,7 +680,7 @@ namespace gr {
}
//length_tag found; set the start of burst flag in the metadata
- else if(not pmt::is_null(_length_tag_key) and pmt::equal(key, _length_tag_key)) {
+ else if(not pmt::is_null(_length_tag_key) && pmt::equal(key, _length_tag_key)) {
if (my_tag_count != samp0_count) {
max_count = my_tag_count;
break;
@@ -704,7 +704,7 @@ namespace gr {
* the appropriate action. Otherwise, make sure the corresponding sample
* is the last one.
*/
- else if (pmt::equal(key, FREQ_KEY) and my_tag_count == samp0_count) {
+ else if (pmt::equal(key, FREQ_KEY) && my_tag_count == samp0_count) {
// If it's on the first sample, immediately do the tune:
GR_LOG_DEBUG(d_debug_logger, boost::format("Received tx_freq on start of burst."));
msg_handler_command(pmt::cons(pmt::mp("freq"), value));
@@ -724,14 +724,14 @@ namespace gr {
*
* Make sure that no more samples are allowed through.
*/
- else if(pmt::is_null(_length_tag_key) and pmt::equal(key, EOB_KEY)) {
+ else if(pmt::is_null(_length_tag_key) && pmt::equal(key, EOB_KEY)) {
found_eob = true;
max_count = my_tag_count + 1;
_metadata.end_of_burst = pmt::to_bool(value);
}
} // end foreach
- if(not pmt::is_null(_length_tag_key) and long(max_count - samp0_count) == _nitems_to_send) {
+ if(not pmt::is_null(_length_tag_key) && long(max_count - samp0_count) == _nitems_to_send) {
found_eob = true;
}
@@ -782,7 +782,7 @@ namespace gr {
_metadata.start_of_burst = true;
_metadata.end_of_burst = false;
// Bursty tx will need to send a tx_time to activate time spec
- _metadata.has_time_spec = not _stream_now and pmt::is_null(_length_tag_key);
+ _metadata.has_time_spec = !_stream_now && pmt::is_null(_length_tag_key);
_nitems_to_send = 0;
if(_start_time_set) {
_start_time_set = false; //cleared for next run
diff --git a/gr-uhd/lib/usrp_source_impl.cc b/gr-uhd/lib/usrp_source_impl.cc
index 53038bf202..6be0bac9ca 100644
--- a/gr-uhd/lib/usrp_source_impl.cc
+++ b/gr-uhd/lib/usrp_source_impl.cc
@@ -723,7 +723,7 @@ namespace gr {
if (command == "freq") {
double freq = pmt::to_double(cmd_value);
for (size_t i = 0; i < _nchan; i++) {
- if (chan == -1 or chan == int(i)) {
+ if (chan == -1 || chan == int(i)) {
set_center_freq(freq, i);
}
}
@@ -733,7 +733,7 @@ namespace gr {
} else if (command == "gain") {
double gain = pmt::to_double(cmd_value);
for (size_t i = 0; i < _nchan; i++) {
- if (chan == -1 or chan == int(i)) {
+ if (chan == -1 || chan == int(i)) {
set_gain(gain, i);
}
}