]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
Compile fix after change 4b64aaf, replace missing constructor for C-string with docst...
[lyx.git] / src / Text.cpp
index 794605405a8440bc1bd5e53479f3a87c20b496f5..12ab04f043397925fbfdd47059172509702d7149 100644 (file)
@@ -69,6 +69,7 @@
 #include "support/lyxalgo.h"
 #include "support/lyxtime.h"
 #include "support/textutils.h"
+#include "support/unique_ptr.h"
 
 #include <sstream>
 
@@ -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;
-               inset.reset(new InsetSpecialChar);
+               auto inset = make_unique<InsetSpecialChar>();
                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;
-               inset.reset(new InsetIPAChar);
+               auto inset = make_unique<InsetIPAChar>();
                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> inset(new InsetTabular(buf));
+               auto inset = make_unique<InsetTabular>(buf);
                inset->read(lex);
                par.insertInset(par.size(), inset.release(), font, change);
        } else if (token == "\\change_unchanged") {