mpd: make ItemType enum class
This commit is contained in:
@@ -59,13 +59,13 @@ bool LocaleBasedItemSorting::operator()(const MPD::Item &a, const MPD::Item &b)
|
||||
{
|
||||
switch (a.type)
|
||||
{
|
||||
case MPD::itDirectory:
|
||||
case MPD::Item::Type::Directory:
|
||||
result = m_cmp(getBasename(a.name), getBasename(b.name));
|
||||
break;
|
||||
case MPD::itPlaylist:
|
||||
case MPD::Item::Type::Playlist:
|
||||
result = m_cmp(a.name, b.name);
|
||||
break;
|
||||
case MPD::itSong:
|
||||
case MPD::Item::Type::Song:
|
||||
switch (m_sort_mode)
|
||||
{
|
||||
case SortMode::Name:
|
||||
|
||||
@@ -200,18 +200,18 @@ MPD::Song::GetFunction charToGetFunction(char c)
|
||||
}
|
||||
}
|
||||
|
||||
std::string itemTypeToString(MPD::ItemType type)
|
||||
std::string itemTypeToString(MPD::Item::Type type)
|
||||
{
|
||||
std::string result;
|
||||
switch (type)
|
||||
{
|
||||
case MPD::itDirectory:
|
||||
case MPD::Item::Type::Directory:
|
||||
result = "directory";
|
||||
break;
|
||||
case MPD::itSong:
|
||||
case MPD::Item::Type::Song:
|
||||
result = "song";
|
||||
break;
|
||||
case MPD::itPlaylist:
|
||||
case MPD::Item::Type::Playlist:
|
||||
result = "playlist";
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,6 @@ MPD::MutableSong::SetFunction tagTypeToSetFunction(mpd_tag_type tag);
|
||||
mpd_tag_type charToTagType(char c);
|
||||
MPD::Song::GetFunction charToGetFunction(char c);
|
||||
|
||||
std::string itemTypeToString(MPD::ItemType type);
|
||||
std::string itemTypeToString(MPD::Item::Type type);
|
||||
|
||||
#endif // NCMPCPP_UTILITY_TYPE_CONVERSIONS_H
|
||||
|
||||
Reference in New Issue
Block a user