summaryrefslogtreecommitdiffstats
path: root/host/lib/wax.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/wax.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/wax.cpp')
-rw-r--r--host/lib/wax.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/wax.cpp b/host/lib/wax.cpp
index 0348d9a66..0e2e82a3a 100644
--- a/host/lib/wax.cpp
+++ b/host/lib/wax.cpp
@@ -39,7 +39,7 @@ public:
wax::obj & operator()(void) const{
//recursively resolve link args to get at original pointer
if (_obj_ptr->type() == typeid(link_args_t)){
- return wax::cast<link_args_t>(*_obj_ptr)();
+ return _obj_ptr->as<link_args_t>()();
}
return *const_cast<wax::obj *>(_obj_ptr);
}
@@ -61,7 +61,7 @@ public:
_obj_link = obj_ptr->get_link();
}
wax::obj & operator()(void) const{
- return wax::cast<link_args_t>(_obj_link)();
+ return _obj_link.as<link_args_t>()();
}
const wax::obj & key(void) const{
return _key;
@@ -94,7 +94,7 @@ wax::obj wax::obj::operator[](const obj &key){
obj val = resolve();
//check if its a special link and call
if (val.type() == typeid(link_args_t)){
- return cast<link_args_t>(val)()[key];
+ return val.as<link_args_t>()()[key];
}
//unknown obj
throw std::runtime_error("cannot use [] on non wax::obj link");