IEM API provider should use std::string instead of std::string_view for abseil compatibility

This commit is contained in:
Dan Paulat 2025-04-05 07:13:49 -05:00
parent d00b2fe063
commit 3f83c8e4a9

View file

@ -139,7 +139,7 @@ IemApiProvider::LoadTextProducts(const std::vector<std::string>& textProducts)
{ {
auto parameters = cpr::Parameters {{"nolimit", "true"}}; auto parameters = cpr::Parameters {{"nolimit", "true"}};
std::vector<std::pair<std::string_view, cpr::AsyncResponse>> std::vector<std::pair<const std::string&, cpr::AsyncResponse>>
asyncResponses {}; asyncResponses {};
asyncResponses.reserve(textProducts.size()); asyncResponses.reserve(textProducts.size());
@ -163,7 +163,7 @@ IemApiProvider::LoadTextProducts(const std::vector<std::string>& textProducts)
if (response.status_code == cpr::status::HTTP_OK) if (response.status_code == cpr::status::HTTP_OK)
{ {
// Load file // Load file
auto productId = asyncResponse.first; auto& productId = asyncResponse.first;
std::shared_ptr<awips::TextProductFile> textProductFile { std::shared_ptr<awips::TextProductFile> textProductFile {
std::make_shared<awips::TextProductFile>()}; std::make_shared<awips::TextProductFile>()};
std::istringstream responseBody {response.text}; std::istringstream responseBody {response.text};