]> git.lyx.org Git - features.git/commitdiff
Fix warning (and simplify)
authorRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 27 Feb 2020 04:37:24 +0000 (23:37 -0500)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:52 +0000 (15:48 +0200)
src/TocBackend.cpp
src/TocBackend.h

index d401e2250936d31f86c4b6c683088f8731676b5a..7ea16b747a20b284fce31eb082c3e8bacde1799f 100644 (file)
@@ -279,7 +279,7 @@ void TocBackend::resetOutlinerNames()
 {
        outliner_names_.clear();
        // names from this document class
-       for (pair<string, docstring> const & name
+       for (auto const & name
                     : buffer_->params().documentClass().outlinerNames())
                addName(name.first, translateIfPossible(name.second));
        // Hardcoded types
index 6ed3e8ee4fbb65dd240206a0112ef3c1a44fc9b6..c6f1d3898cc0c98dc41680023461a415a0a43f35 100644 (file)
@@ -149,7 +149,7 @@ private:
        ///
        TocList tocs_;
        ///
-       std::map<std::string, unique_ptr<TocBuilder>> builders_;
+       std::map<std::string, std::shared_ptr<TocBuilder>> builders_;
        /// Stores localised outliner names from this buffer and its children
        std::map<std::string, docstring> outliner_names_;
        ///