mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +00:00
LibGUI: Allow constructing a string Variant from StringView
This commit is contained in:
parent
c1d67d6b17
commit
b072cb725f
Notes:
sideshowbarker
2024-07-18 21:10:34 +09:00
Author: https://github.com/alimpfard
Commit: b072cb725f
Pull-request: https://github.com/SerenityOS/serenity/pull/5866
Issue: https://github.com/SerenityOS/serenity/issues/4269
Issue: https://github.com/SerenityOS/serenity/issues/4821
Issue: https://github.com/SerenityOS/serenity/issues/5550
Reviewed-by: https://github.com/awesomekling
2 changed files with 6 additions and 0 deletions
|
@ -143,6 +143,11 @@ Variant::Variant(const FlyString& value)
|
|||
{
|
||||
}
|
||||
|
||||
Variant::Variant(const StringView& value)
|
||||
: Variant(value.to_string())
|
||||
{
|
||||
}
|
||||
|
||||
Variant::Variant(const String& value)
|
||||
: m_type(Type::String)
|
||||
{
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
Variant(i64);
|
||||
Variant(unsigned);
|
||||
Variant(const char*);
|
||||
Variant(const StringView&);
|
||||
Variant(const String&);
|
||||
Variant(const FlyString&);
|
||||
Variant(const Gfx::Bitmap&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue