mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Apparently, "requires" is a keyword in C++2a.
This commit is contained in:
parent
0dc9fca86e
commit
21b4ecca7f
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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_; }
|
||||
///
|
||||
|
@ -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_; }
|
||||
|
@ -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_; }
|
||||
///
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user