From 9d47cc54f8bfcec1f6ce3fb0a357d4c19717e392 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 13 Apr 2025 17:41:31 +0200 Subject: [PATCH] LibRegex: Remove unused regex::Match::string and unused constructor This shrinks regex::Match by 8 bytes and removes a member that needs destruction. --- Libraries/LibRegex/RegexMatch.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/Libraries/LibRegex/RegexMatch.h b/Libraries/LibRegex/RegexMatch.h index 7a624ff3af2..73a90e77e5b 100644 --- a/Libraries/LibRegex/RegexMatch.h +++ b/Libraries/LibRegex/RegexMatch.h @@ -476,9 +476,6 @@ private: }; class Match final { -private: - Optional string; - public: Match() = default; ~Match() = default; @@ -492,15 +489,6 @@ public: { } - Match(String string_, size_t const line_, size_t const column_, size_t const global_offset_) - : string(move(string_)) - , view(string.value().bytes_as_string_view()) - , line(line_) - , column(column_) - , global_offset(global_offset_) - { - } - Match(RegexStringView const view_, StringView capture_group_name_, size_t const line_, size_t const column_, size_t const global_offset_) : view(view_) , capture_group_name(MUST(FlyString::from_utf8(capture_group_name_)))