Codechange: Use unique_ptr instead of raw pointer for string layouts. (#13128)

This commit is contained in:
2024-11-27 23:38:57 +00:00
committed by GitHub
parent cf7710fb61
commit fe0afef36f
9 changed files with 15 additions and 15 deletions

View File

@@ -82,9 +82,9 @@ public:
* @param fontMapping THe mapping of the fonts.
* @return The ParagraphLayout instance.
*/
/* static */ ParagraphLayouter *FallbackParagraphLayoutFactory::GetParagraphLayout(char32_t *buff, char32_t *buff_end, FontMap &fontMapping)
/* static */ std::unique_ptr<ParagraphLayouter> FallbackParagraphLayoutFactory::GetParagraphLayout(char32_t *buff, char32_t *buff_end, FontMap &fontMapping)
{
return new FallbackParagraphLayout(buff, buff_end - buff, fontMapping);
return std::make_unique<FallbackParagraphLayout>(buff, buff_end - buff, fontMapping);
}
/**