]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetListingsParams.cpp
Regenerate previews after zoom (#11919)
[features.git] / src / insets / InsetListingsParams.cpp
index 9c87a58c77cab75a2ebb39fe50af904331ffac8d..9390d6bbe4549867005cfe5e2ed3b2c8add7cecf 100644 (file)
@@ -232,8 +232,8 @@ docstring ListingsParam::validate(string const & par) const
                                return bformat(_("Please specify one or more of '%1$s'."),
                                                           from_utf8(info_));
                }
-               for (size_t i = 0; i < par2.size(); ++i)
-                       if (info_.find(par2[i], 0) == string::npos)
+               for (char c : par2)
+                       if (info_.find(c, 0) == string::npos)
                                return bformat(_("Should be composed of one or more of %1$s."),
                                                from_utf8(info_));
                if (unclosed)
@@ -948,12 +948,12 @@ docstring ParValidator::validate(string const & name,
 }
 
 
-bool ParValidator::onoff(string const & name) const
+bool ParValidator::onoff(string const & key) const
 {
        int p = InsetListingsParams::package();
 
        // locate name in parameter table
-       ListingsParams::const_iterator it = all_params_[p].find(name);
+       ListingsParams::const_iterator it = all_params_[p].find(key);
        if (it != all_params_[p].end())
                return it->second.onoff_;
        else
@@ -1073,8 +1073,8 @@ void InsetListingsParams::addParam(string const & key,
        // non-ascii/number characters, just to be safe
        else {
                bool has_special_char = false;
-               for (size_t i = 0; i < value.size(); ++i)
-                       if (!isAlnumASCII(value[i])) {
+               for (char c : value)
+                       if (!isAlnumASCII(c)) {
                                has_special_char = true;
                                break;
                        }