Merge remote-tracking branch 'origin/master' into general_ux_fixes_May2019

This commit is contained in:
Charles J. Cliffe 2019-07-02 20:15:10 -04:00
commit 117c1de3fb
4 changed files with 4 additions and 29 deletions

View File

@ -389,7 +389,7 @@ BookmarkList BookmarkMgr::getBookmarks(std::string group) {
}
if (!bmDataSorted[group]) {
std::sort(bmData[group].begin(), bmData[group].end(), BookmarkEntryCompare());
std::sort(bmData[group].begin(), bmData[group].end(), [](const BookmarkEntryPtr a, const BookmarkEntryPtr b) -> bool { return a->frequency < b->frequency;});
bmDataSorted[group] = true;
}
@ -538,7 +538,7 @@ BookmarkRangeList BookmarkMgr::getRanges() {
std::lock_guard < std::recursive_mutex > lock(busy_lock);
if (!rangesSorted) {
std::sort(ranges.begin(), ranges.end(), BookmarkRangeEntryCompare());
std::sort(ranges.begin(), ranges.end(), [](const BookmarkRangeEntryPtr a, const BookmarkRangeEntryPtr b) -> bool { return a->freq < b->freq;});
rangesSorted = true;
}

View File

@ -48,23 +48,6 @@ public:
typedef std::shared_ptr<BookmarkEntry> BookmarkEntryPtr;
typedef std::shared_ptr<BookmarkRangeEntry> BookmarkRangeEntryPtr;
struct BookmarkEntryCompare : public std::binary_function<BookmarkEntryPtr,BookmarkEntryPtr,bool>
{
bool operator()(const BookmarkEntryPtr a, BookmarkEntryPtr b) const
{
return a->frequency < b->frequency;
}
};
struct BookmarkRangeEntryCompare : public std::binary_function<BookmarkRangeEntryPtr ,BookmarkRangeEntryPtr ,bool>
{
bool operator()(const BookmarkRangeEntryPtr a, BookmarkRangeEntryPtr b) const
{
return a->freq < b->freq;
}
};
typedef std::vector<BookmarkEntryPtr> BookmarkList;
typedef std::vector<BookmarkRangeEntryPtr> BookmarkRangeList;
typedef std::map<std::string, BookmarkList > BookmarkMap;

View File

@ -17,7 +17,7 @@
#include "Timer.h"
#include "SpinMutex.h"
struct map_string_less : public std::binary_function<std::string,std::string,bool>
struct map_string_less
{
bool operator()(const std::string& a,const std::string& b) const
{

View File

@ -37,7 +37,7 @@ using namespace std;
/* map comparison function */
struct string_less : public std::binary_function<std::string,std::string,bool>
struct string_less
{
bool operator()(const std::string& a,const std::string& b) const
{
@ -45,14 +45,6 @@ struct string_less : public std::binary_function<std::string,std::string,bool>
}
};
/* int comparison function */
struct int_less : public std::binary_function<int,int,bool>
{
bool operator()(int a,int b) const
{
return a < b;
}
};
/* Data Exceptions */