summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-10 22:47:45 -0800
committerJosh Blum <josh@joshknows.com>2010-11-10 22:47:45 -0800
commit06e2e1e02fdc93eb00f6cf0d532ffc2943feaf06 (patch)
treefa038e06ed3ed9b4344e3dd4a25676eba2231e2e /host/include
parent24517fa9226a0da8ca297476ea159b230a06ff56 (diff)
downloaduhd-06e2e1e02fdc93eb00f6cf0d532ffc2943feaf06.tar.gz
uhd-06e2e1e02fdc93eb00f6cf0d532ffc2943feaf06.tar.bz2
uhd-06e2e1e02fdc93eb00f6cf0d532ffc2943feaf06.zip
uhd: made unit test for meta range and fixed bug
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/types/ranges.ipp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/include/uhd/types/ranges.ipp b/host/include/uhd/types/ranges.ipp
index 7fd1bf2eb..8b602a24d 100644
--- a/host/include/uhd/types/ranges.ipp
+++ b/host/include/uhd/types/ranges.ipp
@@ -130,10 +130,10 @@ namespace uhd{
range_t<T> last = this->front();
BOOST_FOREACH(const range_t<T> &r, (*this)){
//steps at each range
- if (r.step() != T(0)) non_zero_steps.push_back(r.step());
+ if (r.step() > T(0)) non_zero_steps.push_back(r.step());
//and steps in-between ranges
T ibtw_step = r.start() - last.stop();
- if (ibtw_step != T(0)) non_zero_steps.push_back(ibtw_step);
+ if (ibtw_step > T(0)) non_zero_steps.push_back(ibtw_step);
//store ref to last
last = r;
}