summaryrefslogtreecommitdiffstats
path: root/host/lib/gain_handler.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-03-15 17:43:10 -0700
committerJosh Blum <josh@joshknows.com>2010-03-15 17:43:10 -0700
commitfc40ff2f1327d01c72c4d7dbc07a14e473251981 (patch)
treead7f1ed847d284c3982157e1c43a13773a6aca9c /host/lib/gain_handler.cpp
parente4997af8453980922b469e5d3b66a7b26910dad3 (diff)
downloaduhd-fc40ff2f1327d01c72c4d7dbc07a14e473251981.tar.gz
uhd-fc40ff2f1327d01c72c4d7dbc07a14e473251981.tar.bz2
uhd-fc40ff2f1327d01c72c4d7dbc07a14e473251981.zip
Replaced uses of wax:cast with the templated as method (like in boost program options).
Diffstat (limited to 'host/lib/gain_handler.cpp')
-rw-r--r--host/lib/gain_handler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/gain_handler.cpp b/host/lib/gain_handler.cpp
index 7eb87558c..847bc0528 100644
--- a/host/lib/gain_handler.cpp
+++ b/host/lib/gain_handler.cpp
@@ -48,7 +48,7 @@ private:
gain_t get_overall_gain_val(void);
gain_range_t get_overall_gain_range(void);
template <class T> T get_named_prop(const wax::obj &prop, const std::string &name){
- return wax::cast<T>(_link[named_prop_t(prop, name)]);
+ return _link[named_prop_t(prop, name)].as<T>();
}
};
@@ -85,7 +85,7 @@ gain_handler_impl::~gain_handler_impl(void){
}
prop_names_t gain_handler_impl::get_gain_names(void){
- return wax::cast<prop_names_t>(_link[_props.names]);
+ return _link[_props.names].as<prop_names_t>();
}
gain_t gain_handler_impl::get_overall_gain_val(void){
@@ -145,7 +145,7 @@ bool gain_handler_impl::intercept_set(const wax::obj &key_, const wax::obj &val)
//not a gain value key... dont handle
if (not _is_equal(key, _props.value)) return false;
- gain_t gain_val = wax::cast<gain_t>(val);
+ gain_t gain_val = val.as<gain_t>();
//not a wildcard... dont handle (but check name and range)
if (name != ""){