From d00b2fe06327b3111cd21b17c14ddee0dd863a59 Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Tue, 18 Feb 2025 23:55:14 -0600 Subject: [PATCH] Use const std::string& instead of std::string_view with RE2 to avoid abseil issues --- wxdata/include/scwx/awips/text_product_file.hpp | 2 +- wxdata/source/scwx/awips/text_product_file.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wxdata/include/scwx/awips/text_product_file.hpp b/wxdata/include/scwx/awips/text_product_file.hpp index ce164f20..b0d1c965 100644 --- a/wxdata/include/scwx/awips/text_product_file.hpp +++ b/wxdata/include/scwx/awips/text_product_file.hpp @@ -28,7 +28,7 @@ public: [[nodiscard]] std::shared_ptr message(size_t i) const; bool LoadFile(const std::string& filename); - bool LoadData(std::string_view filename, std::istream& is); + bool LoadData(const std::string& filename, std::istream& is); private: class Impl; diff --git a/wxdata/source/scwx/awips/text_product_file.cpp b/wxdata/source/scwx/awips/text_product_file.cpp index 9b7dcdb0..96d5503f 100644 --- a/wxdata/source/scwx/awips/text_product_file.cpp +++ b/wxdata/source/scwx/awips/text_product_file.cpp @@ -72,7 +72,7 @@ bool TextProductFile::LoadFile(const std::string& filename) return fileValid; } -bool TextProductFile::LoadData(std::string_view filename, std::istream& is) +bool TextProductFile::LoadData(const std::string& filename, std::istream& is) { static constexpr LazyRE2 kDateTimePattern_ = { R"(((?:19|20)\d{2}))" // Year (YYYY)