summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-01-04 13:41:13 +0100
committerAndreas Kling <kling@serenityos.org>2021-01-04 13:41:13 +0100
commit6041e48eaa454ada453be88d39d11d9e5790851f (patch)
treef25ade28b982e3001ec3ebd1ab2be4ce052d487e /Libraries
parent370ce4243005fb123ae1a13177b486c377ce2d6d (diff)
downloadserenity-6041e48eaa454ada453be88d39d11d9e5790851f.zip
LibCore: Make Core::Object::property() const
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibCore/Object.cpp2
-rw-r--r--Libraries/LibCore/Object.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibCore/Object.cpp b/Libraries/LibCore/Object.cpp
index 6860510167..dd627fb8cc 100644
--- a/Libraries/LibCore/Object.cpp
+++ b/Libraries/LibCore/Object.cpp
@@ -195,7 +195,7 @@ void Object::save_to(JsonObject& json)
}
}
-JsonValue Object::property(const StringView& name)
+JsonValue Object::property(const StringView& name) const
{
auto it = m_properties.find(name);
if (it == m_properties.end())
diff --git a/Libraries/LibCore/Object.h b/Libraries/LibCore/Object.h
index c7fb49741d..f8e81743c6 100644
--- a/Libraries/LibCore/Object.h
+++ b/Libraries/LibCore/Object.h
@@ -120,7 +120,7 @@ public:
void save_to(AK::JsonObject&);
bool set_property(const StringView& name, const JsonValue& value);
- JsonValue property(const StringView& name);
+ JsonValue property(const StringView& name) const;
const HashMap<String, NonnullOwnPtr<Property>>& properties() const { return m_properties; }
static IntrusiveList<Object, &Object::m_all_objects_list_node>& all_objects();