summaryrefslogtreecommitdiff
path: root/kms++
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-04-22 10:08:08 +0300
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2025-04-22 10:51:48 +0300
commit02017112a4e99a482717d2bb92ba1cdbe00ff6f1 (patch)
treefcd65af52e8b3258f99f49a20635a3e10d842639 /kms++
parent1192380e2dee300be7dabcc42bf716cf8370a500 (diff)
pixelformats: use string_views
Diffstat (limited to 'kms++')
-rw-r--r--kms++/inc/kms++/pixelformats.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/kms++/inc/kms++/pixelformats.h b/kms++/inc/kms++/pixelformats.h
index c4dd07f..6ee0ea0 100644
--- a/kms++/inc/kms++/pixelformats.h
+++ b/kms++/inc/kms++/pixelformats.h
@@ -7,7 +7,7 @@
namespace kms
{
-constexpr uint32_t str_to_fourcc(const std::string& fourcc)
+constexpr uint32_t str_to_fourcc(const std::string_view fourcc)
{
if (fourcc.empty())
return 0;
@@ -146,8 +146,10 @@ struct PixelFormatPlaneInfo {
};
struct PixelFormatInfo {
- constexpr PixelFormatInfo(const std::string& name, const std::string& drm_fourcc,
- const std::string& v4l2_4cc, PixelColorType color,
+ constexpr PixelFormatInfo(const std::string_view name,
+ const std::string_view drm_fourcc,
+ const std::string_view v4l2_4cc,
+ PixelColorType color,
std::tuple<uint8_t, uint8_t> pixel_align,
std::vector<PixelFormatPlaneInfo> planes)
: name(name), drm_fourcc(kms::str_to_fourcc(drm_fourcc)),