commit 195c0bfbad56601608739838e79c8d71ebcf3152
Author: Richard Kimberly Heck <[email protected]>
Date:   Mon May 4 21:21:42 2020 -0400

    Rename some routines
---
 src/BranchList.cpp  |    8 ++++----
 src/Format.cpp      |   10 +++++-----
 src/IndicesList.cpp |   14 +++++++-------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/BranchList.cpp b/src/BranchList.cpp
index 58b4a81..0113552 100644
--- a/src/BranchList.cpp
+++ b/src/BranchList.cpp
@@ -104,7 +104,7 @@ void Branch::setColor(string const & str)
 
 namespace {
 
-std::function<bool (Branch const &)> BranchNamesEqual(docstring const & d)
+std::function<bool (Branch const &)> BranchNameIs(docstring const & d)
 {
        return [d](Branch const & b){ return b.branch() == d; };
 }
@@ -115,7 +115,7 @@ std::function<bool (Branch const &)> 
BranchNamesEqual(docstring const & d)
 Branch * BranchList::find(docstring const & name)
 {
        List::iterator it =
-               find_if(list_.begin(), list_.end(), BranchNamesEqual(name));
+               find_if(list_.begin(), list_.end(), BranchNameIs(name));
        return it == list_.end() ? nullptr : &*it;
 }
 
@@ -123,7 +123,7 @@ Branch * BranchList::find(docstring const & name)
 Branch const * BranchList::find(docstring const & name) const
 {
        List::const_iterator it =
-               find_if(list_.begin(), list_.end(), BranchNamesEqual(name));
+               find_if(list_.begin(), list_.end(), BranchNameIs(name));
        return it == list_.end() ? nullptr : &*it;
 }
 
@@ -160,7 +160,7 @@ bool BranchList::add(docstring const & s)
 bool BranchList::remove(docstring const & s)
 {
        size_t const size = list_.size();
-       list_.remove_if(BranchNamesEqual(s));
+       list_.remove_if(BranchNameIs(s));
        return size != list_.size();
 }
 
diff --git a/src/Format.cpp b/src/Format.cpp
index a747f00..ee4f7f4 100644
--- a/src/Format.cpp
+++ b/src/Format.cpp
@@ -123,7 +123,7 @@ void Format::setExtensions(string const & e)
 
 namespace {
 
-std::function<bool (Format const &)> FormatNamesEqual(string const & name)
+std::function<bool (Format const &)> FormatNameIs(string const & name)
 {
        return [name](Format const & f){ return f.name() == name; };
 }
@@ -136,7 +136,7 @@ Format const * Formats::getFormat(string const & name) const
 {
        FormatList::const_iterator cit =
                find_if(formatlist_.begin(), formatlist_.end(),
-                       FormatNamesEqual(name));
+                       FormatNameIs(name));
        if (cit != formatlist_.end())
                return &(*cit);
        else
@@ -148,7 +148,7 @@ Format * Formats::getFormat(string const & name)
 {
        FormatList::iterator it =
                find_if(formatlist_.begin(), formatlist_.end(),
-                               FormatNamesEqual(name));
+                               FormatNameIs(name));
 
        if (it != formatlist_.end())
                return &(*it);
@@ -554,7 +554,7 @@ int Formats::getNumber(string const & name) const
 {
        FormatList::const_iterator cit =
                find_if(formatlist_.begin(), formatlist_.end(),
-                       FormatNamesEqual(name));
+                       FormatNameIs(name));
        if (cit == formatlist_.end())
                return -1;
 
@@ -589,7 +589,7 @@ void Formats::erase(string const & name)
 {
        FormatList::iterator it =
                find_if(formatlist_.begin(), formatlist_.end(),
-                       FormatNamesEqual(name));
+                       FormatNameIs(name));
        if (it != formatlist_.end())
                formatlist_.erase(it);
 }
diff --git a/src/IndicesList.cpp b/src/IndicesList.cpp
index 644b9c8..66aa06b 100644
--- a/src/IndicesList.cpp
+++ b/src/IndicesList.cpp
@@ -102,7 +102,7 @@ void Index::setColor(string const & str)
 
 namespace{
 
-std::function<bool (Index const &)> IndexNamesEqual(docstring const & name)
+std::function<bool (Index const &)> IndexNameIs(docstring const & name)
 {
        return [name](Index const & idx){ return idx.index() == name; };
 }
@@ -113,7 +113,7 @@ std::function<bool (Index const &)> 
IndexNamesEqual(docstring const & name)
 Index * IndicesList::find(docstring const & name)
 {
        List::iterator it =
-               find_if(list.begin(), list.end(), IndexNamesEqual(name));
+               find_if(list.begin(), list.end(), IndexNameIs(name));
        return it == list.end() ? nullptr : &*it;
 }
 
@@ -121,14 +121,14 @@ Index * IndicesList::find(docstring const & name)
 Index const * IndicesList::find(docstring const & name) const
 {
        List::const_iterator it =
-               find_if(list.begin(), list.end(), IndexNamesEqual(name));
+               find_if(list.begin(), list.end(), IndexNameIs(name));
        return it == list.end() ? nullptr : &*it;
 }
 
 
 namespace {
 
-std::function<bool (Index const &)> IndexHasShortcut(docstring const & sc)
+std::function<bool (Index const &)> IndexShortcutIs(docstring const & sc)
 {
        return [sc](Index const & idx){ return idx.shortcut() == sc; };
 }
@@ -139,7 +139,7 @@ std::function<bool (Index const &)> 
IndexHasShortcut(docstring const & sc)
 Index * IndicesList::findShortcut(docstring const & shortcut)
 {
        List::iterator it =
-               find_if(list.begin(), list.end(), IndexHasShortcut(shortcut));
+               find_if(list.begin(), list.end(), IndexShortcutIs(shortcut));
        return it == list.end() ? nullptr : &*it;
 }
 
@@ -147,7 +147,7 @@ Index * IndicesList::findShortcut(docstring const & 
shortcut)
 Index const * IndicesList::findShortcut(docstring const & shortcut) const
 {
        List::const_iterator it =
-               find_if(list.begin(), list.end(), IndexHasShortcut(shortcut));
+               find_if(list.begin(), list.end(), IndexShortcutIs(shortcut));
        return it == list.end() ? nullptr : &*it;
 }
 
@@ -202,7 +202,7 @@ bool IndicesList::addDefault(docstring const & n)
 bool IndicesList::remove(docstring const & s)
 {
        size_t const size = list.size();
-       list.remove_if(IndexNamesEqual(s));
+       list.remove_if(IndexNameIs(s));
        return size != list.size();
 }
 
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to