aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/include/uhd/utils/paths.hpp10
-rw-r--r--host/lib/utils/paths.cpp6
2 files changed, 8 insertions, 8 deletions
diff --git a/host/include/uhd/utils/paths.hpp b/host/include/uhd/utils/paths.hpp
index cc054b019..b97d3a55d 100644
--- a/host/include/uhd/utils/paths.hpp
+++ b/host/include/uhd/utils/paths.hpp
@@ -39,7 +39,7 @@ namespace uhd {
UHD_API std::string get_pkg_path(void);
//! Get UHD library paths
- std::vector<fs::path> get_module_paths(void);
+ UHD_API std::vector<fs::path> get_module_paths(void);
/*! Return the UHD images directory path.
*
@@ -58,7 +58,7 @@ namespace uhd {
* \param search_paths A comma-separated list of hints for paths to include.
* \returns A path string if one is found, or an empty string on failure.
*/
- UHD_API std::string get_images_dir(const std::string search_paths);
+ UHD_API std::string get_images_dir(const std::string &search_paths);
/*! Return the full path to particular UHD binary image.
*
@@ -72,7 +72,7 @@ namespace uhd {
* \return the full system path to the file
* \throw exception uhd::io_error if the file was not found.
*/
- UHD_API std::string find_image_path(const std::string &image_name, const std::string search_paths = "");
+ UHD_API std::string find_image_path(const std::string &image_name, const std::string &search_paths = "");
/*!
* Search for the location of a particular UHD utility.
@@ -80,14 +80,14 @@ namespace uhd {
* \param name the name of the utility to search for
* \return the full system path to the given utility
*/
- UHD_API std::string find_utility(std::string name);
+ UHD_API std::string find_utility(const std::string &name);
/*!
* Return an error string recommending the user run the utility.
* The error string will include the full path to the utility to run.
* \return the message suggesting the use of the named utility.
*/
- UHD_API std::string print_utility_error(const std::string &name, const std::string &args="");
+ UHD_API std::string print_utility_error(const std::string &name, const std::string &args = "");
} //namespace uhd
#endif /* INCLUDED_UHD_UTILS_PATHS_HPP */
diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp
index ac4a010a7..eb9e69a49 100644
--- a/host/lib/utils/paths.cpp
+++ b/host/lib/utils/paths.cpp
@@ -261,7 +261,7 @@ std::string _get_images_path_from_registry(const std::string& registry_key_path)
}
#endif /*UHD_PLATFORM_WIN32*/
-std::string uhd::get_images_dir(const std::string search_paths) {
+std::string uhd::get_images_dir(const std::string &search_paths) {
/* This function will check for the existence of directories in this
* order:
@@ -332,7 +332,7 @@ std::string uhd::get_images_dir(const std::string search_paths) {
}
}
-std::string uhd::find_image_path(const std::string &image_name, const std::string search_paths){
+std::string uhd::find_image_path(const std::string &image_name, const std::string &search_paths){
/* If a path was provided on the command-line or as a hint from the caller,
* we default to that. */
if (fs::exists(image_name)){
@@ -364,7 +364,7 @@ std::string uhd::find_image_path(const std::string &image_name, const std::strin
+ uhd::print_utility_error("uhd_images_downloader.py"));
}
-std::string uhd::find_utility(std::string name) {
+std::string uhd::find_utility(const std::string &name) {
return fs::path(fs::path(uhd::get_pkg_path()) / UHD_LIB_DIR / "uhd" / "utils" / name)
.string();
}