summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard
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/usrp/dboard
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/usrp/dboard')
-rw-r--r--host/lib/usrp/dboard/basic.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/host/lib/usrp/dboard/basic.cpp b/host/lib/usrp/dboard/basic.cpp
index e719950e8..095b77ce1 100644
--- a/host/lib/usrp/dboard/basic.cpp
+++ b/host/lib/usrp/dboard/basic.cpp
@@ -98,7 +98,7 @@ void basic_rx::rx_get(const wax::obj &key_, wax::obj &val){
boost::tie(key, name) = extract_named_prop(key_);
//handle the get request conditioned on the key
- switch(wax::cast<subdev_prop_t>(key)){
+ switch(key.as<subdev_prop_t>()){
case SUBDEV_PROP_NAME:
val = std::string(str(boost::format("%s:%s")
% dboard_id::to_string(get_rx_id())
@@ -159,14 +159,14 @@ void basic_rx::rx_set(const wax::obj &key_, const wax::obj &val){
boost::tie(key, name) = extract_named_prop(key_);
//handle the get request conditioned on the key
- switch(wax::cast<subdev_prop_t>(key)){
+ switch(key.as<subdev_prop_t>()){
case SUBDEV_PROP_GAIN:
- ASSERT_THROW(wax::cast<gain_t>(val) == gain_t(0));
+ ASSERT_THROW(val.as<gain_t>() == gain_t(0));
return;
case SUBDEV_PROP_ANTENNA:
- ASSERT_THROW(wax::cast<std::string>(val) == std::string(""));
+ ASSERT_THROW(val.as<std::string>() == std::string(""));
return;
case SUBDEV_PROP_ENABLED:
@@ -207,7 +207,7 @@ void basic_tx::tx_get(const wax::obj &key_, wax::obj &val){
boost::tie(key, name) = extract_named_prop(key_);
//handle the get request conditioned on the key
- switch(wax::cast<subdev_prop_t>(key)){
+ switch(key.as<subdev_prop_t>()){
case SUBDEV_PROP_NAME:
val = dboard_id::to_string(get_tx_id());
return;
@@ -265,14 +265,14 @@ void basic_tx::tx_set(const wax::obj &key_, const wax::obj &val){
boost::tie(key, name) = extract_named_prop(key_);
//handle the get request conditioned on the key
- switch(wax::cast<subdev_prop_t>(key)){
+ switch(key.as<subdev_prop_t>()){
case SUBDEV_PROP_GAIN:
- ASSERT_THROW(wax::cast<gain_t>(val) == gain_t(0));
+ ASSERT_THROW(val.as<gain_t>() == gain_t(0));
return;
case SUBDEV_PROP_ANTENNA:
- ASSERT_THROW(wax::cast<std::string>(val) == std::string(""));
+ ASSERT_THROW(val.as<std::string>() == std::string(""));
return;
case SUBDEV_PROP_ENABLED: