summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/block_executor.cc
diff options
context:
space:
mode:
authorMathias Rasmussen <mathiasvr@gmail.com>2019-10-22 22:26:05 +0200
committerMichael Dickens <michael.dickens@ettus.com>2019-11-17 18:17:03 -0500
commitc750d104d938cc6f3c09417022f132676f6646e4 (patch)
tree48eca6126fae23f932ed03f91b672cd685c73582 /gnuradio-runtime/lib/block_executor.cc
parentf78c95897ec696f208d2bc089c9fdc9e6367903d (diff)
change rounding method to `lround`
Diffstat (limited to 'gnuradio-runtime/lib/block_executor.cc')
-rw-r--r--gnuradio-runtime/lib/block_executor.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gnuradio-runtime/lib/block_executor.cc b/gnuradio-runtime/lib/block_executor.cc
index 97e163b683..eafef6bcd3 100644
--- a/gnuradio-runtime/lib/block_executor.cc
+++ b/gnuradio-runtime/lib/block_executor.cc
@@ -143,7 +143,7 @@ static bool propagate_tags(block::tag_propagation_policy_t policy,
} else if (use_fp_rrate) {
for (t = rtags.begin(); t != rtags.end(); t++) {
tag_t new_tag = *t;
- new_tag.offset = ((double)new_tag.offset * rrate) + 0.5;
+ new_tag.offset = std::llround((double)new_tag.offset * rrate);
for (int o = 0; o < d->noutputs(); o++)
out_buf[o]->add_item_tag(new_tag);
}
@@ -191,7 +191,7 @@ static bool propagate_tags(block::tag_propagation_policy_t policy,
} else if (use_fp_rrate) {
for (t = rtags.begin(); t != rtags.end(); t++) {
tag_t new_tag = *t;
- new_tag.offset = ((double)new_tag.offset * rrate) + 0.5;
+ new_tag.offset = std::llround((double)new_tag.offset * rrate);
out_buf->add_item_tag(new_tag);
}
} else {