summaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/paths.cpp8
-rw-r--r--host/lib/utils/props.cpp9
2 files changed, 9 insertions, 8 deletions
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index 9ac20d855..6ad12d3cc 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -72,13 +72,17 @@ static std::vector<fs::path> get_env_paths(const std::string &var_name){
**********************************************************************/
std::vector<fs::path> get_image_paths(void){
std::vector<fs::path> paths = get_env_paths("UHD_IMAGE_PATH");
- paths.push_back(fs::path(UHD_INSTALL_PREFIX) / UHD_PKG_DATA_DIR / "images");
+ paths.push_back(fs::path(LOCAL_PKG_DATA_DIR) / "images");
+ if (not std::string(INSTALLER_PKG_DATA_DIR).empty())
+ paths.push_back(fs::path(INSTALLER_PKG_DATA_DIR) / "images");
return paths;
}
std::vector<fs::path> get_module_paths(void){
std::vector<fs::path> paths = get_env_paths("UHD_MODULE_PATH");
- paths.push_back(fs::path(UHD_INSTALL_PREFIX) / UHD_PKG_DATA_DIR / "modules");
+ paths.push_back(fs::path(LOCAL_PKG_DATA_DIR) / "modules");
+ if (not std::string(INSTALLER_PKG_DATA_DIR).empty())
+ paths.push_back(fs::path(INSTALLER_PKG_DATA_DIR) / "modules");
return paths;
}
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);
}