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 {
|
namespace Web::CSS::Parser {
|
||||||
|
|
||||||
Function::Function(String name)
|
Function::Function(FlyString name)
|
||||||
: m_name(move(name))
|
: m_name(move(name))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Function::Function(String name, Vector<ComponentValue>&& values)
|
Function::Function(FlyString name, Vector<ComponentValue>&& values)
|
||||||
: m_name(move(name))
|
: m_name(move(name))
|
||||||
, m_values(move(values))
|
, m_values(move(values))
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <AK/FlyString.h>
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
@ -19,17 +20,17 @@ class Function : public RefCounted<Function> {
|
||||||
friend class Parser;
|
friend class Parser;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit Function(String name);
|
explicit Function(FlyString name);
|
||||||
Function(String name, Vector<ComponentValue>&& values);
|
Function(FlyString name, Vector<ComponentValue>&& values);
|
||||||
~Function();
|
~Function();
|
||||||
|
|
||||||
String const& name() const { return m_name; }
|
StringView name() const { return m_name; }
|
||||||
Vector<ComponentValue> const& values() const { return m_values; }
|
Vector<ComponentValue> const& values() const { return m_values; }
|
||||||
|
|
||||||
String to_string() const;
|
String to_string() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
String m_name;
|
FlyString m_name;
|
||||||
Vector<ComponentValue> m_values;
|
Vector<ComponentValue> m_values;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue