mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:37:35 +00:00
LibWeb: Make Function.m_name a FlyString
This commit is contained in:
parent
128d08ecef
commit
7d67e428a6
2 changed files with 7 additions and 6 deletions
|
@ -10,12 +10,12 @@
|
|||
|
||||
namespace Web::CSS::Parser {
|
||||
|
||||
Function::Function(String name)
|
||||
Function::Function(FlyString name)
|
||||
: m_name(move(name))
|
||||
{
|
||||
}
|
||||
|
||||
Function::Function(String name, Vector<ComponentValue>&& values)
|
||||
Function::Function(FlyString name, Vector<ComponentValue>&& values)
|
||||
: m_name(move(name))
|
||||
, m_values(move(values))
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/FlyString.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Vector.h>
|
||||
|
@ -19,17 +20,17 @@ class Function : public RefCounted<Function> {
|
|||
friend class Parser;
|
||||
|
||||
public:
|
||||
explicit Function(String name);
|
||||
Function(String name, Vector<ComponentValue>&& values);
|
||||
explicit Function(FlyString name);
|
||||
Function(FlyString name, Vector<ComponentValue>&& values);
|
||||
~Function();
|
||||
|
||||
String const& name() const { return m_name; }
|
||||
StringView name() const { return m_name; }
|
||||
Vector<ComponentValue> const& values() const { return m_values; }
|
||||
|
||||
String to_string() const;
|
||||
|
||||
private:
|
||||
String m_name;
|
||||
FlyString m_name;
|
||||
Vector<ComponentValue> m_values;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue