From 16e7f26cec287d12b4ccc419935465133598e68e Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Sun, 3 May 2020 02:18:17 -0400 Subject: [PATCH] requires is a keyword in C++2a --- src/Layout.cpp | 6 +++--- src/Layout.h | 2 +- src/insets/InsetLayout.cpp | 2 +- src/output_latex.cpp | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Layout.cpp b/src/Layout.cpp index 3c1a9bd955..3ed2ddf6c8 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -1074,7 +1074,7 @@ void Layout::readArgument(Lexer & lex) arg.tooltip = lex.getDocString(); } else if (tok == "requires") { lex.next(); - arg.requires = lex.getString(); + arg.required = lex.getString(); } else if (tok == "decoration") { lex.next(); arg.decoration = lex.getString(); @@ -1150,8 +1150,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg os << "\t\tPresetArg \"" << to_utf8(arg.presetarg) << "\"\n"; if (!arg.tooltip.empty()) os << "\t\tToolTip \"" << to_utf8(arg.tooltip) << "\"\n"; - if (!arg.requires.empty()) - os << "\t\tRequires \"" << arg.requires << "\"\n"; + if (!arg.required.empty()) + os << "\t\tRequires \"" << arg.required << "\"\n"; if (!arg.decoration.empty()) os << "\t\tDecoration \"" << arg.decoration << "\"\n"; if (!arg.newlinecmd.empty()) diff --git a/src/Layout.h b/src/Layout.h index c8f7c95ad0..edb9ba7f18 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -100,7 +100,7 @@ public: docstring defaultarg; docstring presetarg; docstring tooltip; - std::string requires; + std::string required; std::string decoration; FontInfo font; FontInfo labelfont; diff --git a/src/insets/InsetLayout.cpp b/src/insets/InsetLayout.cpp index dbe290939d..8df2ca5e8b 100644 --- a/src/insets/InsetLayout.cpp +++ b/src/insets/InsetLayout.cpp @@ -689,7 +689,7 @@ void InsetLayout::readArgument(Lexer & lex) arg.tooltip = lex.getDocString(); } else if (tok == "requires") { lex.next(); - arg.requires = lex.getString(); + arg.required = lex.getString(); } else if (tok == "decoration") { lex.next(); arg.decoration = lex.getString(); diff --git a/src/output_latex.cpp b/src/output_latex.cpp index 1185e2d6e3..72a4577f4b 100644 --- a/src/output_latex.cpp +++ b/src/output_latex.cpp @@ -474,8 +474,8 @@ void getArgInsets(otexstream & os, OutputParams const & runparams, Layout::LaTeX // other arguments, consider this. for (auto const & larg : latexargs) { Layout::latexarg const & arg = larg.second; - if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.requires.empty()) { - vector req = getVectorFromString(arg.requires); + if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.required.empty()) { + vector req = getVectorFromString(arg.required); required.insert(required.end(), req.begin(), req.end()); } } @@ -609,7 +609,7 @@ void addArgInsets(Paragraph const & par, string const & prefix, latexargs.find(arg->name()); if (lit != latexargs.end()) { Layout::latexarg const & larg = lit->second; - vector req = getVectorFromString(larg.requires); + vector req = getVectorFromString(larg.required); move(req.begin(), req.end(), back_inserter(required)); } } -- 2.39.5