reduce usage of pointers / replace std::pair in SearchEngine

This commit is contained in:
Andrzej Rybczak
2012-08-28 02:44:08 +02:00
parent a270fc8402
commit 397783d701
17 changed files with 237 additions and 241 deletions

View File

@@ -40,7 +40,7 @@ class Browser : public Screen< Menu<MPD::Item> >
virtual bool isTabbable() { return true; }
virtual MPD::Song *CurrentSong();
virtual MPD::Song *GetSong(size_t pos) { return w->at(pos).type == MPD::itSong ? (*w)[pos].song : 0; }
virtual MPD::Song *GetSong(size_t pos) { return w->at(pos).type == MPD::itSong ? &(*w)[pos].song : 0; }
virtual bool allowsSelection() { return true; }
virtual void ReverseSelection();
@@ -65,6 +65,8 @@ class Browser : public Screen< Menu<MPD::Item> >
# endif // !WIN32
void UpdateItemList();
bool isParentDir(size_t pos) { return itsBrowsedDir != "/" && pos == 0; }
protected:
virtual void Init();
virtual bool isLockable() { return true; }