mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
LibJS: Add default constructor for PrivateName
This avoids a round-trip through FlyString("") for every Reference.
This commit is contained in:
parent
b2f15537bb
commit
a97d75bb63
2 changed files with 2 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
struct PrivateName {
|
struct PrivateName {
|
||||||
|
PrivateName() = default;
|
||||||
PrivateName(u64 unique_id, FlyString description)
|
PrivateName(u64 unique_id, FlyString description)
|
||||||
: unique_id(unique_id)
|
: unique_id(unique_id)
|
||||||
, description(move(description))
|
, description(move(description))
|
||||||
|
|
|
@ -153,7 +153,7 @@ private:
|
||||||
|
|
||||||
bool m_is_private { false };
|
bool m_is_private { false };
|
||||||
// FIXME: This can (probably) be an union with m_name.
|
// FIXME: This can (probably) be an union with m_name.
|
||||||
PrivateName m_private_name { 0, "" };
|
PrivateName m_private_name;
|
||||||
|
|
||||||
Optional<EnvironmentCoordinate> m_environment_coordinate;
|
Optional<EnvironmentCoordinate> m_environment_coordinate;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue