#include "frontends/alert.h"
#include "support/debug.h"
-#include "support/lstrings.h"
#include "support/ExceptionMessage.h"
-
#include "support/lassert.h"
+#include "support/lstrings.h"
+#include "support/unique_ptr.h"
#include <sstream>
+
using namespace std;
using namespace lyx::support;
case EXTERNAL_CODE: {
InsetExternalParams iep;
InsetExternal::string2params(to_utf8(cmd.argument()), *buf, iep);
- auto_ptr<InsetExternal> inset(new InsetExternal(buf));
+ auto inset = make_unique<InsetExternal>(buf);
inset->setBuffer(*buf);
inset->setParams(iep);
return inset.release();
case GRAPHICS_CODE: {
InsetGraphicsParams igp;
InsetGraphics::string2params(to_utf8(cmd.argument()), *buf, igp);
- auto_ptr<InsetGraphics> inset(new InsetGraphics(buf));
+ auto inset = make_unique<InsetGraphics>(buf);
inset->setParams(igp);
return inset.release();
}
if (lex.getString() != "\\begin_inset")
LYXERR0("Buffer::readInset: Consistency check failed.");
- auto_ptr<Inset> inset;
+ unique_ptr<Inset> inset;
string tmptok;
lex >> tmptok;
return 0;
}
inset->setBuffer(*buf);
- } else {
+ } else {
// FIXME This branch should be made to use inset codes
// as the preceding branch does. Unfortunately, that
// will take some doing. It requires converting the