[LyX/master] Apparently, "requires" is a keyword in C++2a.
Richard Kimberly Heck
rikiheck at lyx.org
Fri Feb 28 05:09:40 UTC 2020
commit 21b4ecca7f387c2711e342e675f50306e66e7221
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date: Fri Feb 28 00:26:31 2020 -0500
Apparently, "requires" is a keyword in C++2a.
---
src/BufferParams.cpp | 6 +++---
src/LaTeXFeatures.cpp | 4 ++--
src/Layout.h | 2 +-
src/TextClass.h | 2 +-
src/insets/InsetLayout.h | 2 +-
src/tex2lyx/tex2lyx.cpp | 6 +++---
src/tex2lyx/text.cpp | 10 +++++-----
7 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp
index 29a1181..1155bc6 100644
--- a/src/BufferParams.cpp
+++ b/src/BufferParams.cpp
@@ -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;
}
diff --git a/src/LaTeXFeatures.cpp b/src/LaTeXFeatures.cpp
index fd16b28..ced53bf 100644
--- a/src/LaTeXFeatures.cpp
+++ b/src/LaTeXFeatures.cpp
@@ -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);
}
diff --git a/src/Layout.h b/src/Layout.h
index 53fb682..c8f7c95 100644
--- a/src/Layout.h
+++ b/src/Layout.h
@@ -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_; }
///
diff --git a/src/TextClass.h b/src/TextClass.h
index 3d06345..64fa9aa 100644
--- a/src/TextClass.h
+++ b/src/TextClass.h
@@ -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_; }
diff --git a/src/insets/InsetLayout.h b/src/insets/InsetLayout.h
index 3db9ad1..8f30994 100644
--- a/src/insets/InsetLayout.h
+++ b/src/insets/InsetLayout.h
@@ -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_; }
///
diff --git a/src/tex2lyx/tex2lyx.cpp b/src/tex2lyx/tex2lyx.cpp
index edcba48..667fad7 100644
--- a/src/tex2lyx/tex2lyx.cpp
+++ b/src/tex2lyx/tex2lyx.cpp
@@ -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) {
diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp
index 0972599..f9201cd 100644
--- a/src/tex2lyx/text.cpp
+++ b/src/tex2lyx/text.cpp
@@ -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;
More information about the lyx-cvs
mailing list