mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Replace calls from make_unique to lyx::make_unique
After advice from Yuriy Skalko to satisfy compilation with clang8
This commit is contained in:
parent
437a287dee
commit
ea5e16d075
@ -1471,7 +1471,7 @@ bool Buffer::save() const
|
|||||||
// proper location once that has been done successfully. that
|
// proper location once that has been done successfully. that
|
||||||
// way we preserve the original file if something goes wrong.
|
// way we preserve the original file if something goes wrong.
|
||||||
string const justname = fileName().onlyFileNameWithoutExt();
|
string const justname = fileName().onlyFileNameWithoutExt();
|
||||||
auto tempfile = make_unique<TempFile>(fileName().onlyPath(),
|
auto tempfile = lyx::make_unique<TempFile>(fileName().onlyPath(),
|
||||||
justname + "-XXXXXX.lyx");
|
justname + "-XXXXXX.lyx");
|
||||||
bool const symlink = fileName().isSymLink();
|
bool const symlink = fileName().isSymLink();
|
||||||
if (!symlink)
|
if (!symlink)
|
||||||
|
@ -128,7 +128,7 @@ Buffer * BufferList::createNewBuffer(string const & s)
|
|||||||
{
|
{
|
||||||
unique_ptr<Buffer> tmpbuf;
|
unique_ptr<Buffer> tmpbuf;
|
||||||
try {
|
try {
|
||||||
tmpbuf = make_unique<Buffer>(s);
|
tmpbuf = lyx::make_unique<Buffer>(s);
|
||||||
} catch (ExceptionMessage const & message) {
|
} catch (ExceptionMessage const & message) {
|
||||||
if (message.type_ == ErrorException) {
|
if (message.type_ == ErrorException) {
|
||||||
Alert::error(message.title_, message.details_);
|
Alert::error(message.title_, message.details_);
|
||||||
|
@ -143,7 +143,7 @@ shared_ptr<Toc> TocBackend::toc(string const & type)
|
|||||||
|
|
||||||
TocBuilder & TocBackend::builder(string const & type)
|
TocBuilder & TocBackend::builder(string const & type)
|
||||||
{
|
{
|
||||||
auto p = make_unique<TocBuilder>(toc(type));
|
auto p = lyx::make_unique<TocBuilder>(toc(type));
|
||||||
return * builders_.insert(make_pair(type, move(p))).first->second;
|
return * builders_.insert(make_pair(type, move(p))).first->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -442,7 +442,7 @@ void CacheItem::Impl::convertToDisplayFormat()
|
|||||||
// Connect a signal to this->imageConverted and pass this signal to
|
// Connect a signal to this->imageConverted and pass this signal to
|
||||||
// the graphics converter so that we can load the modified file
|
// the graphics converter so that we can load the modified file
|
||||||
// on completion of the conversion process.
|
// on completion of the conversion process.
|
||||||
converter_ = make_unique<Converter>(doc_file_, filename,
|
converter_ = lyx::make_unique<Converter>(doc_file_, filename,
|
||||||
to_file_base.absFileName(),
|
to_file_base.absFileName(),
|
||||||
from, to_);
|
from, to_);
|
||||||
// Connection is closed at the same time as *this is destroyed.
|
// Connection is closed at the same time as *this is destroyed.
|
||||||
|
@ -599,7 +599,7 @@ void extractFunctions(MathData & ar, ExternalMath kind)
|
|||||||
extractScript(exp, jt, ar.end(), true);
|
extractScript(exp, jt, ar.end(), true);
|
||||||
|
|
||||||
// create a proper inset as replacement
|
// create a proper inset as replacement
|
||||||
auto p = make_unique<InsetMathExFunc>(buf, name);
|
auto p = lyx::make_unique<InsetMathExFunc>(buf, name);
|
||||||
|
|
||||||
// jt points to the "argument". Get hold of this.
|
// jt points to the "argument". Get hold of this.
|
||||||
MathData::iterator st =
|
MathData::iterator st =
|
||||||
@ -684,7 +684,7 @@ void extractIntegrals(MathData & ar, ExternalMath kind)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// core is part from behind the scripts to the 'd'
|
// core is part from behind the scripts to the 'd'
|
||||||
auto p = make_unique<InsetMathExInt>(buf, from_ascii("int"));
|
auto p = lyx::make_unique<InsetMathExInt>(buf, from_ascii("int"));
|
||||||
|
|
||||||
// handle scripts if available
|
// handle scripts if available
|
||||||
if (!testIntSymbol(*it)) {
|
if (!testIntSymbol(*it)) {
|
||||||
@ -769,7 +769,7 @@ void extractSums(MathData & ar)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
// create a proper inset as replacement
|
// create a proper inset as replacement
|
||||||
auto p = make_unique<InsetMathExInt>(buf, from_ascii("sum"));
|
auto p = lyx::make_unique<InsetMathExInt>(buf, from_ascii("sum"));
|
||||||
|
|
||||||
// collect lower bound and summation index
|
// collect lower bound and summation index
|
||||||
InsetMathScript const * sub = ar[i]->asScriptInset();
|
InsetMathScript const * sub = ar[i]->asScriptInset();
|
||||||
@ -857,7 +857,7 @@ void extractDiff(MathData & ar)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create a proper diff inset
|
// create a proper diff inset
|
||||||
auto diff = make_unique<InsetMathDiff>(buf);
|
auto diff = lyx::make_unique<InsetMathDiff>(buf);
|
||||||
|
|
||||||
// collect function, let jt point behind last used item
|
// collect function, let jt point behind last used item
|
||||||
MathData::iterator jt = it + 1;
|
MathData::iterator jt = it + 1;
|
||||||
|
@ -59,7 +59,7 @@ FileSystemWatcher::getGuard(FileName const & filename)
|
|||||||
//static
|
//static
|
||||||
FileMonitorPtr FileSystemWatcher::monitor(FileName const & filename)
|
FileMonitorPtr FileSystemWatcher::monitor(FileName const & filename)
|
||||||
{
|
{
|
||||||
return make_unique<FileMonitor>(instance().getGuard(filename));
|
return lyx::make_unique<FileMonitor>(instance().getGuard(filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +67,7 @@ FileMonitorPtr FileSystemWatcher::monitor(FileName const & filename)
|
|||||||
ActiveFileMonitorPtr FileSystemWatcher::activeMonitor(FileName const & filename,
|
ActiveFileMonitorPtr FileSystemWatcher::activeMonitor(FileName const & filename,
|
||||||
int interval)
|
int interval)
|
||||||
{
|
{
|
||||||
return make_unique<ActiveFileMonitor>(instance().getGuard(filename),
|
return lyx::make_unique<ActiveFileMonitor>(instance().getGuard(filename),
|
||||||
filename, interval);
|
filename, interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user