]> git.lyx.org Git - features.git/commitdiff
Apparently, "requires" is a keyword in C++2a.
authorRichard Kimberly Heck <rikiheck@lyx.org>
Fri, 28 Feb 2020 05:26:31 +0000 (00:26 -0500)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:52 +0000 (15:48 +0200)
src/BufferParams.cpp
src/LaTeXFeatures.cpp
src/Layout.h
src/TextClass.h
src/insets/InsetLayout.h
src/tex2lyx/tex2lyx.cpp
src/tex2lyx/text.cpp

index 29a118147a94e0a4864ed1bb0980db96c54b2294..1155bc642fc322a7de3c8afa89eb739bbdb67f00 100644 (file)
@@ -1497,7 +1497,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
 
 void BufferParams::validate(LaTeXFeatures & features) const
 {
-       features.require(documentClass().requires());
+       features.require(documentClass().required());
 
        if (columns > 1 && language->rightToLeft())
                features.require("rtloutputdblcol");
@@ -2496,8 +2496,8 @@ LayoutFile const * BufferParams::baseClass() const
 {
        if (LayoutFileList::get().haveClass(pimpl_->baseClass_))
                return &(LayoutFileList::get()[pimpl_->baseClass_]);
-       else
-               return 0;
+
+       return nullptr;
 }
 
 
index fd16b2803554c3406dd1a20341fd7749e9440d7d..ced53bfe42a36e550872685929022e19a6af41ad 100644 (file)
@@ -717,7 +717,7 @@ void LaTeXFeatures::useLayout(docstring const & layoutname, int level)
                        return;
 
                Layout const & layout = tclass[layoutname];
-               require(layout.requires());
+               require(layout.required());
 
                if (!layout.depends_on().empty()) {
                        useLayout(layout.depends_on(), level + 1);
@@ -744,7 +744,7 @@ void LaTeXFeatures::useInsetLayout(InsetLayout const & lay)
                        != usedInsetLayouts_.end())
                return;
 
-       require(lay.requires());
+       require(lay.required());
        usedInsetLayouts_.push_back(lname);
 }
 
index 53fb682a6ef279c5b5ed87f23796f591a8105b1c..c8f7c95ad08ad70dc0d64cc98747b953d4b5e9d3 100644 (file)
@@ -153,7 +153,7 @@ public:
        /// this layout for language \p lang
        docstring const babelpreamble() const { return babelpreamble_; }
        ///
-       std::set<std::string> const & requires() const { return requires_; }
+       std::set<std::string> const & required() const { return requires_; }
        ///
        std::set<docstring> const & autonests() const { return autonests_; }
        ///
index 3d063456366bdc6c7eafabdc1890369e43db9426..64fa9aa127a7ef2b8b7773ac1ee63221e09a12b8 100644 (file)
@@ -490,7 +490,7 @@ public:
        /// is this feature already provided by the class?
        bool provides(std::string const & p) const;
        /// features required by the class?
-       std::set<std::string> const & requires() const { return requires_; }
+       std::set<std::string> const & required() const { return requires_; }
        /// package options to write to LaTeX file
        std::map<std::string, std::string> const & packageOptions() const
                { return package_options_; }
index 3db9ad1679946a5efa0cee7a599e0d7435d4f03b..8f3099438a08472c2d5990e470cd1a5867e97316 100644 (file)
@@ -149,7 +149,7 @@ public:
        /// Defaults to true.
        bool htmlisblock() const { return htmlisblock_; }
        ///
-       std::set<std::string> requires() const { return requires_; }
+       std::set<std::string> required() const { return requires_; }
        ///
        bool isMultiPar() const { return multipar_; }
        ///
index edcba48578162d2d26f3b703bd0d4139a781078a..667fad76b6f88d08a1d7ea1a8ff3f99b32d97a1a 100644 (file)
@@ -371,13 +371,13 @@ bool checkModule(string const & name, bool command)
                if (layout) {
                        found_style = true;
                        dpre = layout->preamble();
-                       std::set<std::string> lreqs = layout->requires();
+                       std::set<std::string> lreqs = layout->required();
                        if (!lreqs.empty())
                                cmd_reqs.insert(lreqs.begin(), lreqs.end());
                } else if (insetlayout) {
                        found_style = true;
                        dpre = insetlayout->preamble();
-                       std::set<std::string> lreqs = insetlayout->requires();
+                       std::set<std::string> lreqs = insetlayout->required();
                        if (!lreqs.empty())
                                cmd_reqs.insert(lreqs.begin(), lreqs.end());
                }
@@ -386,7 +386,7 @@ bool checkModule(string const & name, bool command)
                bool const package_cmd = dpre.empty();
                bool match_req = false;
                if (package_cmd) {
-                       std::set<std::string> mreqs = it->second->requires();
+                       std::set<std::string> mreqs = it->second->required();
                        if (!mreqs.empty())
                                cmd_reqs.insert(mreqs.begin(), mreqs.end());
                        for (auto const & pack : cmd_reqs) {
index 0972599057b0c487fdf24540f058ba1ab73b42c1..f9201cd1a26f73f307979729869a3f243d5d0683 100644 (file)
@@ -2355,7 +2355,7 @@ void parse_environment(Parser & p, ostream & os, bool outer,
                        p.skip_spaces();
                        if (!preamble.titleLayoutFound())
                                preamble.titleLayoutFound(newlayout->intitle);
-                       set<string> const & req = newlayout->requires();
+                       set<string> const & req = newlayout->required();
                        set<string>::const_iterator it = req.begin();
                        set<string>::const_iterator en = req.end();
                        for (; it != en; ++it)
@@ -3533,7 +3533,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                        parse_text_snippet(p, os, FLAG_ITEM, outer, context);
                                        if (!preamble.titleLayoutFound())
                                                preamble.titleLayoutFound(newlayout->intitle);
-                                       set<string> const & req = newlayout->requires();
+                                       set<string> const & req = newlayout->required();
                                        set<string>::const_iterator it = req.begin();
                                        set<string>::const_iterator en = req.end();
                                        for (; it != en; ++it)
@@ -3559,7 +3559,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        p.skip_spaces();
                        if (!preamble.titleLayoutFound())
                                preamble.titleLayoutFound(newlayout->intitle);
-                       set<string> const & req = newlayout->requires();
+                       set<string> const & req = newlayout->required();
                        for (set<string>::const_iterator it = req.begin(); it != req.end(); ++it)
                                preamble.registerAutomaticallyLoadedPackage(*it);
                        continue;
@@ -3576,7 +3576,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        p.skip_spaces();
                        if (!preamble.titleLayoutFound())
                                preamble.titleLayoutFound(newlayout->intitle);
-                       set<string> const & req = newlayout->requires();
+                       set<string> const & req = newlayout->required();
                        for (set<string>::const_iterator it = req.begin(); it != req.end(); ++it)
                                preamble.registerAutomaticallyLoadedPackage(*it);
                        continue;
@@ -3590,7 +3590,7 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        p.skip_spaces();
                        if (!preamble.titleLayoutFound())
                                preamble.titleLayoutFound(newlayout->intitle);
-                       set<string> const & req = newlayout->requires();
+                       set<string> const & req = newlayout->required();
                        for (set<string>::const_iterator it = req.begin(); it != req.end(); ++it)
                                preamble.registerAutomaticallyLoadedPackage(*it);
                        continue;