mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +00:00
Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
This commit is contained in:
parent
e5f09ea170
commit
3f3f45580a
762 changed files with 8315 additions and 8316 deletions
|
@ -272,7 +272,7 @@ String BackgroundStyleValue::to_string() const
|
|||
StringBuilder builder;
|
||||
for (size_t i = 0; i < m_layer_count; i++) {
|
||||
if (i)
|
||||
builder.append(", ");
|
||||
builder.append(", "sv);
|
||||
if (i == m_layer_count - 1)
|
||||
builder.appendff("{} ", m_color->to_string());
|
||||
builder.appendff("{} {} {} {} {} {} {}", get_layer_value_string(m_image, i), get_layer_value_string(m_position, i), get_layer_value_string(m_size, i), get_layer_value_string(m_repeat, i), get_layer_value_string(m_attachment, i), get_layer_value_string(m_origin, i), get_layer_value_string(m_clip, i));
|
||||
|
@ -1530,7 +1530,7 @@ String ShadowStyleValue::to_string() const
|
|||
StringBuilder builder;
|
||||
builder.appendff("{} {} {} {} {}", m_color.to_string(), m_offset_x.to_string(), m_offset_y.to_string(), m_blur_radius.to_string(), m_spread_distance.to_string());
|
||||
if (m_placement == ShadowPlacement::Inner)
|
||||
builder.append(" inset");
|
||||
builder.append(" inset"sv);
|
||||
return builder.to_string();
|
||||
}
|
||||
|
||||
|
@ -1582,7 +1582,7 @@ String TransformationStyleValue::to_string() const
|
|||
StringBuilder builder;
|
||||
builder.append(CSS::to_string(m_transform_function));
|
||||
builder.append('(');
|
||||
builder.join(", ", m_values);
|
||||
builder.join(", "sv, m_values);
|
||||
builder.append(')');
|
||||
|
||||
return builder.to_string();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue