mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:27:35 +00:00
AK: Make HashMap::get(Key) return an Optional<Value>.
This allows HashMap::get() to be used for value types that cannot be default constructed (e.g NonnullOwnPtr.)
This commit is contained in:
parent
e2798d6208
commit
1d0b464618
10 changed files with 27 additions and 17 deletions
|
@ -20,10 +20,10 @@ public:
|
|||
void for_each_font(Function<void(const StringView&)>);
|
||||
void for_each_fixed_width_font(Function<void(const StringView&)>);
|
||||
|
||||
Metadata get_metadata_by_name(const StringView& name) const
|
||||
Optional<Metadata> get_metadata_by_name(const StringView& name) const
|
||||
{
|
||||
return m_name_to_metadata.get(name);
|
||||
};
|
||||
}
|
||||
|
||||
private:
|
||||
GFontDatabase();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue