]> git.lyx.org Git - lyx.git/commitdiff
Replace calls from make_unique to lyx::make_unique
authorKornel Benko <kornel@lyx.org>
Fri, 15 Jan 2021 10:36:14 +0000 (11:36 +0100)
committerKornel Benko <kornel@lyx.org>
Fri, 15 Jan 2021 10:36:14 +0000 (11:36 +0100)
After advice from Yuriy Skalko to satisfy compilation with clang8

src/Buffer.cpp
src/BufferList.cpp
src/TocBackend.cpp
src/graphics/GraphicsCacheItem.cpp
src/mathed/MathExtern.cpp
src/support/FileMonitor.cpp

index 6505b3b4297fecea5fcd09e0d9932b26e4b57808..12af84f3e645c9f6fb53538aa6dc62ae9f871824 100644 (file)
@@ -1471,7 +1471,7 @@ bool Buffer::save() const
        // proper location once that has been done successfully. that
        // way we preserve the original file if something goes wrong.
        string const justname = fileName().onlyFileNameWithoutExt();
-       auto tempfile = make_unique<TempFile>(fileName().onlyPath(),
+       auto tempfile = lyx::make_unique<TempFile>(fileName().onlyPath(),
                                              justname + "-XXXXXX.lyx");
        bool const symlink = fileName().isSymLink();
        if (!symlink)
index 1a538d413f0ab1178e398b1fb70bb1cfb6b0caba..145c0c44a0ffc593b4b92da901323ca9f027b418 100644 (file)
@@ -128,7 +128,7 @@ Buffer * BufferList::createNewBuffer(string const & s)
 {
        unique_ptr<Buffer> tmpbuf;
        try {
-               tmpbuf = make_unique<Buffer>(s);
+               tmpbuf = lyx::make_unique<Buffer>(s);
        } catch (ExceptionMessage const & message) {
                if (message.type_ == ErrorException) {
                        Alert::error(message.title_, message.details_);
index 90e7675a98b510e4ead7d1764ce372c502df2e9b..b3a36f1dd2f6100ba08d6827147bdedf702cf7ba 100644 (file)
@@ -143,7 +143,7 @@ shared_ptr<Toc> TocBackend::toc(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;
 }
 
index 49132cc33b2df749b6bc3bb5b793862d191e3bb7..397b39810e3f480fae82d4604fafbf28226d0561 100644 (file)
@@ -442,7 +442,7 @@ void CacheItem::Impl::convertToDisplayFormat()
        // Connect a signal to this->imageConverted and pass this signal to
        // the graphics converter so that we can load the modified file
        // 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(),
                                            from, to_);
        // Connection is closed at the same time as *this is destroyed.
index 0df0ece6aef4e679401487ed461771600d273f95..a473259ba0b0707fc65f5db8d0f68cdf952011f9 100644 (file)
@@ -599,7 +599,7 @@ void extractFunctions(MathData & ar, ExternalMath kind)
                extractScript(exp, jt, ar.end(), true);
 
                // 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.
                MathData::iterator st =
@@ -684,7 +684,7 @@ void extractIntegrals(MathData & ar, ExternalMath kind)
                        continue;
 
                // 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
                if (!testIntSymbol(*it)) {
@@ -769,7 +769,7 @@ void extractSums(MathData & ar)
                        continue;
 
                // 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
                InsetMathScript const * sub = ar[i]->asScriptInset();
@@ -857,7 +857,7 @@ void extractDiff(MathData & ar)
                }
 
                // 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
                MathData::iterator jt = it + 1;
index 50f112590899884a35ae87a4413e8a9f79475cf5..0af322d9eeabe2b4144fa568894a687c7e2b8a86 100644 (file)
@@ -59,7 +59,7 @@ FileSystemWatcher::getGuard(FileName const & filename)
 //static
 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,
                                                       int interval)
 {
-       return make_unique<ActiveFileMonitor>(instance().getGuard(filename),
+       return lyx::make_unique<ActiveFileMonitor>(instance().getGuard(filename),
                                              filename, interval);
 }