From 8468fb9ae5f53c5ed27b0e895145656728a6dde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Thu, 25 Jan 2024 20:42:53 +0100 Subject: [PATCH] AK: Use StringView as its own peek type StringView is already a reference type, and copying it is cheap, so we should use it as its own peek type. --- AK/StringView.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AK/StringView.h b/AK/StringView.h index fa81b94f824..96cdeaa2881 100644 --- a/AK/StringView.h +++ b/AK/StringView.h @@ -377,6 +377,8 @@ private: template<> struct Traits : public DefaultTraits { + using PeekType = StringView; + using ConstPeekType = StringView; static unsigned hash(StringView s) { return s.hash(); } };