mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -40,7 +40,7 @@ IntRect TextLayout::bounding_rect(TextWrapping wrapping, int line_spacing) const
|
|||
return bounding_rect;
|
||||
}
|
||||
|
||||
Vector<String, 32> TextLayout::wrap_lines(TextElision elision, TextWrapping wrapping, int line_spacing, FitWithinRect fit_within_rect) const
|
||||
Vector<DeprecatedString, 32> TextLayout::wrap_lines(TextElision elision, TextWrapping wrapping, int line_spacing, FitWithinRect fit_within_rect) const
|
||||
{
|
||||
Vector<Block> blocks;
|
||||
|
||||
|
@ -117,7 +117,7 @@ Vector<String, 32> TextLayout::wrap_lines(TextElision elision, TextWrapping wrap
|
|||
if (max_lines_that_can_fit == 0)
|
||||
return {};
|
||||
|
||||
Vector<String> lines;
|
||||
Vector<DeprecatedString> lines;
|
||||
StringBuilder builder;
|
||||
size_t line_width = 0;
|
||||
size_t current_block = 0;
|
||||
|
@ -183,7 +183,7 @@ blocks_processed:
|
|||
return lines;
|
||||
}
|
||||
|
||||
String TextLayout::elide_text_from_right(Utf8View text, bool force_elision) const
|
||||
DeprecatedString TextLayout::elide_text_from_right(Utf8View text, bool force_elision) const
|
||||
{
|
||||
size_t text_width = m_font->width(text);
|
||||
if (force_elision || text_width > static_cast<unsigned>(m_rect.width())) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue