From 95d90a760b63afdc8c844654a90568509d87342a Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Sat, 13 May 2023 20:26:20 +0200 Subject: [PATCH] AK: Make all HashMap copy-constructs explicit --- AK/JsonObject.cpp | 4 ++-- AK/SourceGenerator.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AK/JsonObject.cpp b/AK/JsonObject.cpp index 6f9e65fa63..6678f2d7e4 100644 --- a/AK/JsonObject.cpp +++ b/AK/JsonObject.cpp @@ -14,7 +14,7 @@ JsonObject::JsonObject() = default; JsonObject::~JsonObject() = default; JsonObject::JsonObject(JsonObject const& other) - : m_members(other.m_members) + : m_members(other.m_members.clone().release_value_but_fixme_should_propagate_errors()) { } @@ -26,7 +26,7 @@ JsonObject::JsonObject(JsonObject&& other) JsonObject& JsonObject::operator=(JsonObject const& other) { if (this != &other) - m_members = other.m_members; + m_members = other.m_members.clone().release_value_but_fixme_should_propagate_errors(); return *this; } diff --git a/AK/SourceGenerator.h b/AK/SourceGenerator.h index 1e6b24ce34..fb25a230cd 100644 --- a/AK/SourceGenerator.h +++ b/AK/SourceGenerator.h @@ -27,7 +27,7 @@ public: } explicit SourceGenerator(StringBuilder& builder, MappingType const& mapping, char opening = '@', char closing = '@') : m_builder(builder) - , m_mapping(mapping) + , m_mapping(mapping.clone().release_value_but_fixme_should_propagate_errors()) , m_opening(opening) , m_closing(closing) {