diff options
author | Josh Blum <josh@joshknows.com> | 2012-08-31 11:20:17 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-08-31 11:20:17 -0700 |
commit | 667dcf0b98bb5a99654cf883fb97d2a549582cff (patch) | |
tree | 7c845d7ac3f506c000ab495b1d62d976b816b5cd /host/lib/types | |
parent | 05a06254a7f0149425bdda0e5544507bd35a671b (diff) | |
parent | 36a7def9aa6cecaa6f3cbf9979544d6fd5848a08 (diff) | |
download | uhd-667dcf0b98bb5a99654cf883fb97d2a549582cff.tar.gz uhd-667dcf0b98bb5a99654cf883fb97d2a549582cff.tar.bz2 uhd-667dcf0b98bb5a99654cf883fb97d2a549582cff.zip |
Merge branch 'next'
Diffstat (limited to 'host/lib/types')
-rw-r--r-- | host/lib/types/ranges.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/host/lib/types/ranges.cpp b/host/lib/types/ranges.cpp index 6e39bc688..82a9a84e1 100644 --- a/host/lib/types/ranges.cpp +++ b/host/lib/types/ranges.cpp @@ -1,5 +1,5 @@ // -// Copyright 2011-2011 Ettus Research LLC +// Copyright 2011-2012 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -27,17 +27,8 @@ using namespace uhd; /*********************************************************************** * range_t implementation code **********************************************************************/ -struct range_t::impl{ - impl(double start, double stop, double step): - start(start), stop(stop), step(step) - { - /* NOP */ - } - double start, stop, step; -}; - range_t::range_t(double value): - _impl(UHD_PIMPL_MAKE(impl, (value, value, 0))) + _start(value), _stop(value), _step(0.0) { /* NOP */ } @@ -45,7 +36,7 @@ range_t::range_t(double value): range_t::range_t( double start, double stop, double step ): - _impl(UHD_PIMPL_MAKE(impl, (start, stop, step))) + _start(start), _stop(stop), _step(step) { if (stop < start){ throw uhd::value_error("cannot make range where stop < start"); @@ -53,15 +44,15 @@ range_t::range_t( } double range_t::start(void) const{ - return _impl->start; + return _start; } double range_t::stop(void) const{ - return _impl->stop; + return _stop; } double range_t::step(void) const{ - return _impl->step; + return _step; } const std::string range_t::to_pp_string(void) const{ |