From f773cf9fb96e25d064f43cffdc893ac905d91f15 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Sat, 28 Sep 2019 13:13:41 +0200 Subject: uhd: Replace boost::regex with std::regex boost::regex was a requirement until the minimum version of gcc was increased. Since it is at version 5.3 now, using Boost.Regex is no longer necessary. This change is a pure search-and-replace; Boost and std versions of regex are compatible and use the same syntax. --- host/lib/utils/paths.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'host/lib/utils/paths.cpp') diff --git a/host/lib/utils/paths.cpp b/host/lib/utils/paths.cpp index 8a7ba001f..7fd64e6f5 100644 --- a/host/lib/utils/paths.cpp +++ b/host/lib/utils/paths.cpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include @@ -200,16 +200,16 @@ std::vector uhd::get_module_paths(void){ * \return The images path, formatted for windows. */ std::string _get_images_path_from_registry(const std::string& registry_key_path) { - boost::smatch reg_key_match; + std::smatch reg_key_match; //If a substring in the search path is enclosed in [] (square brackets) then it is interpreted as a registry path - if (not boost::regex_search(registry_key_path, reg_key_match, boost::regex("\\[(.+)\\](.*)", boost::regex::icase))) + if (not std::regex_search(registry_key_path, reg_key_match, std::regex("\\[(.+)\\](.*)", std::regex::icase))) return std::string(); std::string reg_key_path = std::string(reg_key_match[1].first, reg_key_match[1].second); std::string path_suffix = std::string(reg_key_match[2].first, reg_key_match[2].second); //Split the registry path into parent, key-path and value. - boost::smatch reg_parent_match; - if (not boost::regex_search(reg_key_path, reg_parent_match, boost::regex("^(.+?)\\\\(.+)\\\\(.+)$", boost::regex::icase))) + std::smatch reg_parent_match; + if (not std::regex_search(reg_key_path, reg_parent_match, std::regex("^(.+?)\\\\(.+)\\\\(.+)$", std::regex::icase))) return std::string(); std::string reg_parent = std::string(reg_parent_match[1].first, reg_parent_match[1].second); std::string reg_path = std::string(reg_parent_match[2].first, reg_parent_match[2].second); -- cgit v1.2.3