get rid of name shadow warnings
This commit is contained in:
@@ -671,20 +671,20 @@ bool DeleteBrowserItems::canBeRun() const
|
|||||||
void DeleteBrowserItems::run()
|
void DeleteBrowserItems::run()
|
||||||
{
|
{
|
||||||
auto get_name = [](const MPD::Item &item) -> std::string {
|
auto get_name = [](const MPD::Item &item) -> std::string {
|
||||||
std::string name;
|
std::string iname;
|
||||||
switch (item.type())
|
switch (item.type())
|
||||||
{
|
{
|
||||||
case MPD::Item::Type::Directory:
|
case MPD::Item::Type::Directory:
|
||||||
name = getBasename(item.directory().path());
|
iname = getBasename(item.directory().path());
|
||||||
break;
|
break;
|
||||||
case MPD::Item::Type::Song:
|
case MPD::Item::Type::Song:
|
||||||
name = item.song().getName();
|
iname = item.song().getName();
|
||||||
break;
|
break;
|
||||||
case MPD::Item::Type::Playlist:
|
case MPD::Item::Type::Playlist:
|
||||||
name = getBasename(item.playlist().path());
|
iname = getBasename(item.playlist().path());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return name;
|
return iname;
|
||||||
};
|
};
|
||||||
|
|
||||||
boost::format question;
|
boost::format question;
|
||||||
|
|||||||
@@ -155,12 +155,12 @@ Service::Result ArtistInfo::processData(const std::string &data)
|
|||||||
auto add_similars = [&result](boost::sregex_iterator &it, const boost::sregex_iterator &last) {
|
auto add_similars = [&result](boost::sregex_iterator &it, const boost::sregex_iterator &last) {
|
||||||
for (; it != last; ++it)
|
for (; it != last; ++it)
|
||||||
{
|
{
|
||||||
std::string name = it->str(1);
|
std::string value = it->str(1);
|
||||||
std::string url = it->str(2);
|
std::string url = it->str(2);
|
||||||
stripHtmlTags(name);
|
stripHtmlTags(value);
|
||||||
stripHtmlTags(url);
|
stripHtmlTags(url);
|
||||||
result.second += "\n * ";
|
result.second += "\n * ";
|
||||||
result.second += name;
|
result.second += value;
|
||||||
result.second += " (";
|
result.second += " (";
|
||||||
result.second += url;
|
result.second += url;
|
||||||
result.second += ")";
|
result.second += ")";
|
||||||
|
|||||||
Reference in New Issue
Block a user