]> git.lyx.org Git - features.git/commitdiff
Properly fix #10863 compiler warnings.
authorRichard Heck <rgheck@lyx.org>
Sat, 16 Dec 2017 14:30:12 +0000 (09:30 -0500)
committerRichard Heck <rgheck@lyx.org>
Sat, 16 Dec 2017 14:30:12 +0000 (09:30 -0500)
Also change a few variable names, so as not to use "it" with
range-based for loops.

src/BufferParams.cpp
src/insets/InsetCitation.cpp
src/mathed/InsetMathHull.cpp
src/mathed/MathParser.cpp

index 711f52f16c2e2d6ef00f33f9dd7b4810cd25de3b..8cb0c2cae6f647bf28812e2a3057c28425c73816 100644 (file)
@@ -2674,8 +2674,8 @@ OutputParams::FLAVOR BufferParams::getOutputFlavor(string const & format) const
                if (find(backs.begin(), backs.end(), dformat) == backs.end()) {
                        // Get shortest path to format
                        Graph::EdgePath path;
-                       for (auto const & bit : backs) {
-                               Graph::EdgePath p = theConverters().getPath(bit, dformat);
+                       for (auto const & bvar : backs) {
+                               Graph::EdgePath p = theConverters().getPath(bvar, dformat);
                                if (!p.empty() && (path.empty() || p.size() < path.size())) {
                                        path = p;
                                }
index 236dda2316ddb3fe08084c050e59874b66b4fc14..167fc241d299cbeec1f9726630dc7e97e2e1c508 100644 (file)
@@ -253,8 +253,8 @@ docstring InsetCitation::toolTip(BufferView const & bv, int, int) const
        docstring tip;
        tip += "<ol>";
        int count = 0;
-       for (docstring const & kit : keys) {
-               docstring const key_info = bi.getInfo(kit, buffer(), ci);
+       for (docstring const & kvar : keys) {
+               docstring const key_info = bi.getInfo(kvar, buffer(), ci);
                // limit to reasonable size.
                if (count > 9 && keys.size() > 11) {
                        tip.push_back(0x2026);// HORIZONTAL ELLIPSIS
index 724c11574ea08860a7ccef2b34a51a28f10948a3..06368ac4906c9c0976210ec3233ec516d0be0e53 100644 (file)
@@ -824,8 +824,8 @@ void InsetMathHull::preparePreview(DocIterator const & pos,
                usedMacros(cell(idx), pos, macros, defs);
 
        docstring macro_preamble;
-       for (auto const & defit : defs)
-               macro_preamble.append(defit);
+       for (auto const & defvar : defs)
+               macro_preamble.append(defvar);
 
        // set the font series and size for this snippet
        DocIterator dit = pos.getInnerText();
index 35062caefe3a3c69cbe75c5f522f64641ec499a7..aaf8b229f89065c7925ac5c6cf38acceb151b950 100644 (file)
@@ -745,7 +745,7 @@ docstring Parser::parse_verbatim_option()
        docstring res;
        if (nextToken().character() == '[') {
                Token t = getToken();
-               for (Token t = getToken(); t.character() != ']' && good(); t = getToken()) {
+               for (t = getToken(); t.character() != ']' && good(); t = getToken()) {
                        if (t.cat() == catBegin) {
                                putback();
                                res += '{' + parse_verbatim_item() + '}';
@@ -763,7 +763,7 @@ docstring Parser::parse_verbatim_item()
        docstring res;
        if (nextToken().cat() == catBegin) {
                Token t = getToken();
-               for (Token t = getToken(); t.cat() != catEnd && good(); t = getToken()) {
+               for (t = getToken(); t.cat() != catEnd && good(); t = getToken()) {
                        if (t.cat() == catBegin) {
                                putback();
                                res += '{' + parse_verbatim_item() + '}';