diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2014-11-03 00:59:52 +0100 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2014-11-03 00:59:52 +0100 |
commit | 24de827f8bf349442678704f4583e75bf8606a2d (patch) | |
tree | 20e959ea28f5d5806a72bcba547c4e49ee2394c5 | |
parent | 202a21c4b3cdc57d2bb2acd905ec02fe4fc5e4fb (diff) |
fix shadow warnings
-rw-r--r-- | src/actions.cpp | 46 | ||||
-rw-r--r-- | src/mpdpp.h | 12 | ||||
-rw-r--r-- | src/search_engine.cpp | 2 | ||||
-rw-r--r-- | src/sel_items_adder.cpp | 2 | ||||
-rw-r--r-- | src/tag_editor.cpp | 8 | ||||
-rw-r--r-- | src/tiny_tag_editor.cpp | 4 |
6 files changed, 37 insertions, 37 deletions
diff --git a/src/actions.cpp b/src/actions.cpp index 80673806..b021898d 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -254,7 +254,7 @@ void setWindowsDimensions() void confirmAction(const boost::format &description) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << description.str() << " [" << NC::Format::Bold << 'y' << NC::Format::NoBold << '/' << NC::Format::Bold << 'n' << NC::Format::NoBold @@ -781,7 +781,7 @@ void SavePlaylist::run() std::string playlist_name; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Save playlist as: "; playlist_name = wFooter->prompt(); } @@ -828,7 +828,7 @@ void ExecuteCommand::run() std::string cmd_name; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; NC::Window::ScopedPromptHook helper(*wFooter, Statusbar::Helpers::TryExecuteImmediateCommand() ); @@ -953,7 +953,7 @@ void Add::run() std::string path; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << (myScreen == myPlaylistEditor ? "Add to playlist: " : "Add: "); path = wFooter->prompt(); } @@ -1259,7 +1259,7 @@ void SetCrossfade::run() { using Global::wFooter; - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Set crossfade to: "; auto crossfade = fromString<unsigned>(wFooter->prompt()); lowerBoundCheck(crossfade, 0u); @@ -1273,7 +1273,7 @@ void SetVolume::run() unsigned volume; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Set volume to: "; volume = fromString<unsigned>(wFooter->prompt()); boundsCheck(volume, 0u, 100u); @@ -1319,7 +1319,7 @@ void EditLibraryTag::run() std::string new_tag; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << tagTypeToString(Config.media_lib_primary_tag) << NC::Format::NoBold << ": "; new_tag = wFooter->prompt(myLibrary->Tags.current().value().tag()); } @@ -1378,7 +1378,7 @@ void EditLibraryAlbum::run() // FIXME: merge this and EditLibraryTag. also, prompt on failure if user wants to continue std::string new_album; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << "Album: " << NC::Format::NoBold; new_album = wFooter->prompt(myLibrary->Albums.current().value().entry().album()); } @@ -1437,7 +1437,7 @@ void EditDirectoryName::run() { std::string old_dir = myBrowser->main().current().value().directory().path(), new_dir; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << "Directory: " << NC::Format::NoBold; new_dir = wFooter->prompt(old_dir); } @@ -1472,7 +1472,7 @@ void EditDirectoryName::run() { std::string old_dir = myTagEditor->Dirs->current().value().first, new_dir; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << "Directory: " << NC::Format::NoBold; new_dir = wFooter->prompt(old_dir); } @@ -1514,7 +1514,7 @@ void EditPlaylistName::run() else old_name = myBrowser->main().current().value().playlist().path(); { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << "Playlist: " << NC::Format::NoBold; new_name = wFooter->prompt(old_name); } @@ -1586,7 +1586,7 @@ void ToggleScreenLock::run() unsigned part = Config.locked_screen_width_part*100; if (Config.ask_for_locked_screen_width_part) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "% of the locked screen's width to be reserved (20-80): "; part = fromString<unsigned>(wFooter->prompt(boost::lexical_cast<std::string>(part))); } @@ -1630,7 +1630,7 @@ void JumpToPositionInSong::run() std::string spos; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Position to go (in %/m:ss/seconds(s)): "; spos = wFooter->prompt(); } @@ -1844,7 +1844,7 @@ void ApplyFilter::run() try { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; NC::Window::ScopedPromptHook helper(*wFooter, Statusbar::Helpers::ApplyFilterImmediately(f, filter) ); @@ -1895,7 +1895,7 @@ void Find::run() std::string token; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Find: "; token = wFooter->prompt(); } @@ -1972,7 +1972,7 @@ void ToggleReplayGainMode::run() char rgm = 0; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Replay gain mode? " << "[" << NC::Format::Bold << 'o' << NC::Format::NoBold << "ff" << "/" << NC::Format::Bold << 't' << NC::Format::NoBold << "rack" @@ -2044,7 +2044,7 @@ void AddRandomItems::run() using Global::wFooter; char rnd_type = 0; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Add random? " << "[" << NC::Format::Bold << 's' << NC::Format::NoBold << "ongs" << "/" << NC::Format::Bold << 'a' << NC::Format::NoBold << "rtists" @@ -2065,7 +2065,7 @@ void AddRandomItems::run() unsigned number; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Number of random " << tag_type_str << "s: "; number = fromString<unsigned>(wFooter->prompt()); } @@ -2125,7 +2125,7 @@ void ToggleLibraryTagType::run() char tag_type = 0; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Tag type? " << "[" << NC::Format::Bold << 'a' << NC::Format::NoBold << "rtist" << "/" << "album" << NC::Format::Bold << 'A' << NC::Format::NoBold << "rtist" @@ -2206,7 +2206,7 @@ void SetSelectedItemsPriority::run() unsigned prio; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Set priority [0-255]: "; prio = fromString<unsigned>(wFooter->prompt()); boundsCheck(prio, 0u, 255u); @@ -2230,7 +2230,7 @@ void SetVisualizerSampleMultiplier::run() double multiplier; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Set visualizer sample multiplier: "; multiplier = fromString<double>(wFooter->prompt()); lowerBoundCheck(multiplier, 0.0); @@ -2251,7 +2251,7 @@ void FilterPlaylistOnPriorities::run() unsigned prio; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Show songs with priority higher than: "; prio = fromString<unsigned>(wFooter->prompt()); boundsCheck(prio, 0u, 255u); @@ -2803,7 +2803,7 @@ void findItem(const Find direction) std::string token; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Find " << (direction == Find::Forward ? "forward" : "backward") << ": "; token = wFooter->prompt(); } diff --git a/src/mpdpp.h b/src/mpdpp.h index b1fea757..08427ed1 100644 --- a/src/mpdpp.h +++ b/src/mpdpp.h @@ -131,8 +131,8 @@ struct Directory m_path = mpd_directory_get_path(directory); m_last_modified = mpd_directory_get_last_modified(directory); } - Directory(std::string path, time_t last_modified = 0) - : m_path(std::move(path)) + Directory(std::string path_, time_t last_modified = 0) + : m_path(std::move(path_)) , m_last_modified(last_modified) { } @@ -171,8 +171,8 @@ struct Playlist m_path = mpd_playlist_get_path(playlist); m_last_modified = mpd_playlist_get_last_modified(playlist); } - Playlist(std::string path, time_t last_modified = 0) - : m_path(std::move(path)) + Playlist(std::string path_, time_t last_modified = 0) + : m_path(std::move(path_)) , m_last_modified(last_modified) { if (m_path.empty()) @@ -339,8 +339,8 @@ struct Iterator: std::iterator<std::input_iterator_tag, ObjectT> typedef std::function<bool(State &)> Fetcher; - State(mpd_connection *connection, Fetcher fetcher) - : m_connection(connection) + State(mpd_connection *connection_, Fetcher fetcher) + : m_connection(connection_) , m_fetcher(fetcher) { assert(m_connection != nullptr); diff --git a/src/search_engine.cpp b/src/search_engine.cpp index e37abda3..4d65ffaf 100644 --- a/src/search_engine.cpp +++ b/src/search_engine.cpp @@ -155,7 +155,7 @@ void SearchEngine::enterPressed() if (option < ConstraintsNumber) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; std::string constraint = ConstraintsNames[option]; Statusbar::put() << NC::Format::Bold << constraint << NC::Format::NoBold << ": "; itsConstraints[option] = Global::wFooter->prompt(itsConstraints[option]); diff --git a/src/sel_items_adder.cpp b/src/sel_items_adder.cpp index 0d398283..6ecb66f4 100644 --- a/src/sel_items_adder.cpp +++ b/src/sel_items_adder.cpp @@ -226,7 +226,7 @@ void SelectedItemsAdder::addToNewPlaylist() const { std::string playlist; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Save playlist as: "; playlist = Global::wFooter->prompt(); } diff --git a/src/tag_editor.cpp b/src/tag_editor.cpp index bddb6b05..22eb40d6 100644 --- a/src/tag_editor.cpp +++ b/src/tag_editor.cpp @@ -359,7 +359,7 @@ void TagEditor::enterPressed() { std::string new_pattern; { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << "Pattern: "; new_pattern = wFooter->prompt(Config.pattern); } @@ -488,7 +488,7 @@ void TagEditor::enterPressed() MPD::MutableSong::SetFunction set = SongInfo::Tags[id].Set; if (id > 0 && w == TagTypes) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << TagTypes->current().value() << NC::Format::NoBold << ": "; std::string new_tag = wFooter->prompt(Tags->current().value().getTags(get, Config.tags_separator)); for (auto it = EditedSongs.begin(); it != EditedSongs.end(); ++it) @@ -496,7 +496,7 @@ void TagEditor::enterPressed() } else if (w == Tags) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << TagTypes->current().value() << NC::Format::NoBold << ": "; std::string new_tag = wFooter->prompt(Tags->current().value().getTags(get, Config.tags_separator)); if (new_tag != Tags->current().value().getTags(get, Config.tags_separator)) @@ -515,7 +515,7 @@ void TagEditor::enterPressed() } else if (w == Tags) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; MPD::MutableSong &s = Tags->current().value(); std::string old_name = s.getNewName().empty() ? s.getName() : s.getNewName(); size_t last_dot = old_name.rfind("."); diff --git a/src/tiny_tag_editor.cpp b/src/tiny_tag_editor.cpp index 374b74c9..8c5e90bc 100644 --- a/src/tiny_tag_editor.cpp +++ b/src/tiny_tag_editor.cpp @@ -103,7 +103,7 @@ void TinyTagEditor::enterPressed() size_t option = w.choice(); if (option < 19) // separator after comment { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; size_t pos = option-8; Statusbar::put() << NC::Format::Bold << SongInfo::Tags[pos].Name << ": " << NC::Format::NoBold; itsEdited.setTags(SongInfo::Tags[pos].Set, Global::wFooter->prompt( @@ -114,7 +114,7 @@ void TinyTagEditor::enterPressed() } else if (option == 20) { - Statusbar::ScopedLock lock; + Statusbar::ScopedLock slock; Statusbar::put() << NC::Format::Bold << "Filename: " << NC::Format::NoBold; std::string filename = itsEdited.getNewName().empty() ? itsEdited.getName() : itsEdited.getNewName(); size_t dot = filename.rfind("."); |