]> git.lyx.org Git - features.git/commitdiff
Improve style.
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 31 Dec 2016 16:38:26 +0000 (17:38 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 31 Dec 2016 16:38:26 +0000 (17:38 +0100)
Thanks, José!

src/CiteEnginesList.cpp

index ee7287538dd81754b5f4f098b19fb4bb8f9d1f55..279063cafd37cf8d2c40f4db90fbfe605a17ce44 100644 (file)
@@ -123,10 +123,7 @@ string LyXCiteEngine::getDefaultBiblio(CiteEngineType const & cet) const
        string res;
        string const etp = theCiteEnginesList.getTypeAsString(cet) + ":";
        //check whether all of the required packages are available
-       vector<string>::const_iterator it  = default_biblios_.begin();
-       vector<string>::const_iterator end = default_biblios_.end();
-       for (; it != end; ++it) {
-               string const s = *it;
+       for (string const &s: default_biblios_) {
                if (prefixIs(s, etp))
                        res = split(s, ':');
                else if (!contains(s, ':') && res.empty())
@@ -139,13 +136,10 @@ string LyXCiteEngine::getDefaultBiblio(CiteEngineType const & cet) const
 bool LyXCiteEngine::isDefaultBiblio(string const & bf) const
 {
        string const bfs = ":" + bf;
-       vector<string>::const_iterator it  = default_biblios_.begin();
-       vector<string>::const_iterator end = default_biblios_.end();
-       for (; it != end; ++it) {
-               string const s = *it;
+       for (string const &s: default_biblios_)
                if (suffixIs(s, bfs) || bf == s)
                        return true;
-       }
+
        return false;
 }