From bd74ce178d54a0c6aa0c8d60ed250775de8ef159 Mon Sep 17 00:00:00 2001 From: Uwe Seimet Date: Fri, 8 Sep 2023 18:16:33 +0200 Subject: [PATCH] Update transform() --- cpp/shared/piscsi_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/shared/piscsi_util.cpp b/cpp/shared/piscsi_util.cpp index 9390331d0d..e4db789eab 100644 --- a/cpp/shared/piscsi_util.cpp +++ b/cpp/shared/piscsi_util.cpp @@ -85,8 +85,8 @@ string piscsi_util::Banner(string_view app) string piscsi_util::GetExtensionLowerCase(string_view filename) { - string ext = path(filename).extension(); - ranges::transform(ext, ext.begin(), ::tolower); + string ext; + ranges::transform(path(filename).extension().string(), back_inserter(ext), ::tolower); // Remove the leading dot return ext.empty() ? "" : ext.substr(1);