From 02017112a4e99a482717d2bb92ba1cdbe00ff6f1 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 22 Apr 2025 10:08:08 +0300 Subject: pixelformats: use string_views --- kms++/inc/kms++/pixelformats.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'kms++') 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 pixel_align, std::vector planes) : name(name), drm_fourcc(kms::str_to_fourcc(drm_fourcc)), -- cgit v1.2.3