summaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-07-04 13:40:19 -0700
committerJosh Blum <josh@joshknows.com>2012-07-04 13:40:19 -0700
commitd61c9b29b357579aa41928c225d137645144e20d (patch)
treee9fe7ee72a49283f95b745e566a509c1b3993c94 /host
parent45c1af8152d02cd7d4e5d5d603e1cca65f6dd539 (diff)
downloaduhd-d61c9b29b357579aa41928c225d137645144e20d.tar.gz
uhd-d61c9b29b357579aa41928c225d137645144e20d.tar.bz2
uhd-d61c9b29b357579aa41928c225d137645144e20d.zip
uhd: make range_t a lightweight object
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/types/ranges.hpp5
-rw-r--r--host/include/uhd/version.hpp2
-rw-r--r--host/lib/types/ranges.cpp21
3 files changed, 9 insertions, 19 deletions
diff --git a/host/include/uhd/types/ranges.hpp b/host/include/uhd/types/ranges.hpp
index f0d0e1c0b..ac632df93 100644
--- a/host/include/uhd/types/ranges.hpp
+++ b/host/include/uhd/types/ranges.hpp
@@ -1,5 +1,5 @@
//
-// Copyright 2010-2011 Ettus Research LLC
+// Copyright 2010-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
@@ -19,7 +19,6 @@
#define INCLUDED_UHD_TYPES_RANGES_HPP
#include <uhd/config.hpp>
-#include <uhd/utils/pimpl.hpp>
#include <string>
#include <vector>
@@ -60,7 +59,7 @@ namespace uhd{
//! Convert this range to a printable string
const std::string to_pp_string(void) const;
- private: UHD_PIMPL_DECL(impl) _impl;
+ private: double _start, _stop, _step;
};
/*!
diff --git a/host/include/uhd/version.hpp b/host/include/uhd/version.hpp
index 09d0e55fd..ec017ee32 100644
--- a/host/include/uhd/version.hpp
+++ b/host/include/uhd/version.hpp
@@ -27,7 +27,7 @@
* The format is oldest ABI compatible release - ABI compat number.
* The compatibility number allows pre-release ABI to be versioned.
*/
-#define UHD_VERSION_ABI_STRING "3.4.0-2"
+#define UHD_VERSION_ABI_STRING "3.4.0-3"
namespace uhd{
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{