X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText.cpp;h=12ab04f043397925fbfdd47059172509702d7149;hb=1440b6a2fc6d39782a486f045d72506eb9215712;hp=794605405a8440bc1bd5e53479f3a87c20b496f5;hpb=41fda35c596bc9b70da7839cc7a3b8409fed82cc;p=lyx.git diff --git a/src/Text.cpp b/src/Text.cpp index 794605405a..12ab04f043 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -69,6 +69,7 @@ #include "support/lyxalgo.h" #include "support/lyxtime.h" #include "support/textutils.h" +#include "support/unique_ptr.h" #include @@ -463,8 +464,7 @@ void Text::readParToken(Paragraph & par, Lexer & lex, } else if (token == "\\SpecialChar" || (token == "\\SpecialCharNoPassThru" && !par.layout().pass_thru && !inset().isPassThru())) { - auto_ptr inset; - inset.reset(new InsetSpecialChar); + auto inset = make_unique(); inset->read(lex); inset->setBuffer(*buf); par.insertInset(par.size(), inset.release(), font, change); @@ -473,8 +473,7 @@ void Text::readParToken(Paragraph & par, Lexer & lex, docstring const s = ltrim(lex.getDocString(), "\\"); par.insert(par.size(), s, font, change); } else if (token == "\\IPAChar") { - auto_ptr inset; - inset.reset(new InsetIPAChar); + auto inset = make_unique(); inset->read(lex); inset->setBuffer(*buf); par.insertInset(par.size(), inset.release(), font, change); @@ -499,7 +498,7 @@ void Text::readParToken(Paragraph & par, Lexer & lex, } else if (token == "\\backslash") { par.appendChar('\\', font, change); } else if (token == "\\LyXTable") { - auto_ptr inset(new InsetTabular(buf)); + auto inset = make_unique(buf); inset->read(lex); par.insertInset(par.size(), inset.release(), font, change); } else if (token == "\\change_unchanged") {