aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/utils
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-09-28 13:13:41 +0200
committerMartin Braun <martin.braun@ettus.com>2019-11-26 12:21:32 -0800
commitf773cf9fb96e25d064f43cffdc893ac905d91f15 (patch)
treeb9aab514b0289687dcc006a831c832a53051f34d /host/lib/utils
parentfcc2e9c602a6103dfd0f75e035f614b177c5dc35 (diff)
downloaduhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.tar.gz
uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.tar.bz2
uhd-f773cf9fb96e25d064f43cffdc893ac905d91f15.zip
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.
Diffstat (limited to 'host/lib/utils')
-rw-r--r--host/lib/utils/paths.cpp10
1 files changed, 5 insertions, 5 deletions
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 <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
-#include <boost/regex.hpp>
+#include <regex>
#include <boost/tokenizer.hpp>
#include <cstdio>
@@ -200,16 +200,16 @@ std::vector<fs::path> 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);