Cleanup for b1dd97d, thanks to Flössie

This commit is contained in:
heckflosse
2017-07-07 12:39:52 +02:00
parent 29be023a8c
commit c30683f5f6
2 changed files with 6 additions and 6 deletions

View File

@@ -604,13 +604,13 @@ void FileBrowser::addEntry_ (FileBrowserEntry* entry)
std::lower_bound(
fd.begin(),
fd.end(),
(ThumbBrowserEntryBase*)entry,
[](ThumbBrowserEntryBase* a, ThumbBrowserEntryBase* b)
entry,
[](const ThumbBrowserEntryBase* a, const ThumbBrowserEntryBase* b)
{
return *b < *a;
return *a < *b;
}
),
(ThumbBrowserEntryBase*)entry
entry
);
initEntry (entry);

View File

@@ -167,9 +167,9 @@ public:
void setPosition (int x, int y, int w, int h);
void setOffset (int x, int y);
bool operator< (ThumbBrowserEntryBase& other)
bool operator <(const ThumbBrowserEntryBase& other) const
{
return shortname.casefold() > other.shortname.casefold();
return shortname.casefold() < other.shortname.casefold();
}
ThumbBrowserEntryBase* getOriginal () const;