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/transport/nirio/lvbitx/template_lvbitx.cpp | 2 +- host/lib/transport/nirio/nifpga_lvbitx.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'host/lib/transport') diff --git a/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp b/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp index 8f1fb6b36..4cae73f9c 100644 --- a/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp +++ b/host/lib/transport/nirio/lvbitx/template_lvbitx.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include namespace uhd {{ namespace niusrprio {{ 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 #include #include -#include +#include 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( "([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("") != 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; -- cgit v1.2.3