Skip to content

Commit de2e69e

Browse files
Fix implicit construction of std::string from std::string_view
1 parent c5f873e commit de2e69e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/perfdata/elasticsearchdatastreamwriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ Value ElasticsearchDatastreamWriter::TrySend(const Url::Ptr& url, String body)
664664
}
665665

666666
/* Accept application/json with optional charset (any variant), case-insensitive. */
667-
std::string ctLower = response[http::field::content_type];
667+
auto ctLower = std::string{response[http::field::content_type]};
668668
boost::trim(ctLower);
669669
boost::to_lower(ctLower);
670670
if (!(ctLower == "application/json" || ctLower == "application/json; charset=utf-8")) {

0 commit comments

Comments
 (0)