]> git.lyx.org Git - lyx.git/blobdiff - src/CiteEnginesList.cpp
Hack to display section symbol
[lyx.git] / src / CiteEnginesList.cpp
index 58b686511b0eda996efd99dd093001ccc5f543bf..6a1cef1a1185c97421f6a9750ad33003c74fafef 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Richard Heck
+ * \author Richard Kimberly Heck
  * \author Jürgen Spitzmüller
  *
  * Full author contact details are available in file CREDITS.
@@ -14,7 +14,6 @@
 
 #include "CiteEnginesList.h"
 
-#include "Citation.h"
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
 
@@ -102,7 +101,7 @@ string LyXCiteEngine::getDefaultBiblio(CiteEngineType const & cet) const
 bool LyXCiteEngine::isDefaultBiblio(string const & bf) const
 {
        string const bfs = ":" + bf;
-       for (string const &s: default_biblios_)
+       for (string const & s: default_biblios_)
                if (suffixIs(s, bfs) || bf == s)
                        return true;
 
@@ -110,7 +109,7 @@ bool LyXCiteEngine::isDefaultBiblio(string const & bf) const
 }
 
 
-bool LyXCiteEngine::requires(const string p) const
+bool LyXCiteEngine::required(string const & p) const
 {
        return find(package_list_.begin(), package_list_.end(), p) != package_list_.end();
 }
@@ -294,25 +293,21 @@ LyXCiteEnginesList::iterator CiteEnginesList::end()
 
 LyXCiteEngine const * CiteEnginesList::operator[](string const & str) const
 {
-       LyXCiteEnginesList::const_iterator it = englist_.begin();
-       for (; it != englist_.end(); ++it)
-               if (it->getID() == str) {
-                       LyXCiteEngine const & eng = *it;
+       for (auto const & eng : englist_)
+               if (eng.getID() == str) {
                        return ŋ
                }
-       return 0;
+       return nullptr;
 }
 
 
 LyXCiteEngine * CiteEnginesList::operator[](string const & str)
 {
-       LyXCiteEnginesList::iterator it = englist_.begin();
-       for (; it != englist_.end(); ++it)
-               if (it->getID() == str) {
-                       LyXCiteEngine & eng = *it;
+       for (auto & eng : englist_)
+               if (eng.getID() == str) {
                        return ŋ
                }
-       return 0;
+       return nullptr;
 }
 
 } // namespace lyx