aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-15 10:51:25 -0700
committerJosh Blum <josh@joshknows.com>2010-08-15 10:51:25 -0700
commit98ba0cc067489d417342314a7e7408d2dbbc8250 (patch)
tree7fdcaf08c5bbf150bd03711c9909ed5ca77f1818 /host/lib/utils
parent6c3d37caa3a47ca534c5e3a110adad0137d5d06d (diff)
downloaduhd-98ba0cc067489d417342314a7e7408d2dbbc8250.tar.gz
uhd-98ba0cc067489d417342314a7e7408d2dbbc8250.tar.bz2
uhd-98ba0cc067489d417342314a7e7408d2dbbc8250.zip
uhd: extract named prop returns a named prop (not a tuple)
simplifies the code after the property set/get declaration
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/props.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/host/lib/utils/props.cpp b/host/lib/utils/props.cpp
index fac5fe24f..fc9f8e63f 100644
--- a/host/lib/utils/props.cpp
+++ b/host/lib/utils/props.cpp
@@ -29,15 +29,12 @@ named_prop_t::named_prop_t(
/* NOP */
}
-typedef boost::tuple<wax::obj, std::string> named_prop_tuple;
-
-named_prop_tuple uhd::extract_named_prop(
+named_prop_t named_prop_t::extract(
const wax::obj &key,
const std::string &name
){
if (key.type() == typeid(named_prop_t)){
- named_prop_t np = key.as<named_prop_t>();
- return named_prop_tuple(np.key, np.name);
+ return key.as<named_prop_t>();
}
- return named_prop_tuple(key, name);
+ return named_prop_t(key, name);
}