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 | |
| 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')
| -rw-r--r-- | host/lib/transport/nirio/lvbitx/template_lvbitx.cpp | 2 | ||||
| -rw-r--r-- | host/lib/transport/nirio/nifpga_lvbitx.cpp | 10 | 
2 files changed, 6 insertions, 6 deletions
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 <streambuf>  #include <boost/filesystem/path.hpp>  #include <boost/algorithm/string.hpp> -#include <boost/regex.hpp> +#include <regex>  #include <uhd/utils/paths.hpp>  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 <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;  | 
