diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-09-28 13:13:41 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | f773cf9fb96e25d064f43cffdc893ac905d91f15 (patch) | |
tree | b9aab514b0289687dcc006a831c832a53051f34d /host/lib/transport/nirio/nifpga_lvbitx.cpp | |
parent | fcc2e9c602a6103dfd0f75e035f614b177c5dc35 (diff) | |
download | uhd-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/transport/nirio/nifpga_lvbitx.cpp')
-rw-r--r-- | host/lib/transport/nirio/nifpga_lvbitx.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/host/lib/transport/nirio/nifpga_lvbitx.cpp b/host/lib/transport/nirio/nifpga_lvbitx.cpp index ef4a02aff..015344710 100644 --- a/host/lib/transport/nirio/nifpga_lvbitx.cpp +++ b/host/lib/transport/nirio/nifpga_lvbitx.cpp @@ -11,15 +11,15 @@ #include <fstream> #include <streambuf> #include <boost/algorithm/string.hpp> -#include <boost/regex.hpp> +#include <regex> namespace uhd { namespace niusrprio { std::string nifpga_lvbitx::_get_bitstream_checksum(const std::string& file_path) { - const boost::regex md5_regex( + const std::regex md5_regex( "<BitstreamMD5>([a-fA-F0-9]{32})<\\/BitstreamMD5>", - boost::regex::icase); + std::regex::icase); std::ifstream lvbitx_stream(file_path.c_str()); if (!lvbitx_stream.is_open()) { @@ -32,9 +32,9 @@ std::string nifpga_lvbitx::_get_bitstream_checksum(const std::string& file_path) try { // short-circuiting the regex search with a simple find is faster // for cases where the tag doesn't exist - boost::smatch md5_match; + std::smatch md5_match; if (line.find("<BitstreamMD5>") != std::string::npos && - boost::regex_search(line, md5_match, md5_regex)) + std::regex_search(line, md5_match, md5_regex)) { checksum = std::string(md5_match[1].first, md5_match[1].second); break; |