commit e0f553b941ef2a14da046e1f4e10acbf3d63b08d
Author: Yuriy Skalko <[email protected]>
Date: Wed Dec 2 00:16:55 2020 +0200
Fix warnings and use range-based loop
---
src/frontends/qt/Menus.cpp | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/frontends/qt/Menus.cpp b/src/frontends/qt/Menus.cpp
index 8437ace..e567c64 100644
--- a/src/frontends/qt/Menus.cpp
+++ b/src/frontends/qt/Menus.cpp
@@ -1809,12 +1809,8 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
InsetQuotes const * qinset =
static_cast<InsetQuotes const *>(inset);
- map<string, docstring> styles = quoteparams.getTypes();
string const qtype = qinset->getType();
- map<string, docstring>::const_iterator qq = styles.begin();
- map<string, docstring>::const_iterator end = styles.end();
-
MenuDefinition aqs;
BufferParams const & bp = bv->buffer().masterBuffer()->params();
@@ -1856,10 +1852,12 @@ void MenuDefinition::expandQuotes(BufferView const * bv)
main_dynamic_qs = true;
}
// now traverse through the static styles ...
- for (; qq != end; ++qq) {
- docstring const style = from_ascii(qq->first);
- bool langdef = (style[0] == langqs);
- bool globaldef = (style[0] == globalqsc);
+ map<string, docstring> styles = quoteparams.getTypes();
+ for (auto const & s : styles) {
+ char style_char = (s.first)[0];
+ bool langdef = (style_char == langqs);
+ bool globaldef = (style_char == globalqsc);
+ docstring const style = from_ascii(s.first);
if (prefixIs(style, qtype[0])) {
FuncRequest cmd = FuncRequest(LFUN_INSET_MODIFY, subcmd
+ style);
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs