From 41317d31c8bd5c58ff6c1fac0b9fa215b866826a Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sun, 13 Nov 2016 11:04:23 +0100 Subject: [PATCH] configure: require c++14 compatible compiler --- NEWS | 1 + configure.ac | 67 ++----- src/actions.h | 422 +++++++++++++++++++-------------------- src/browser.h | 52 ++--- src/clock.h | 18 +- src/help.h | 14 +- src/lastfm.h | 14 +- src/lyrics.h | 14 +- src/lyrics_fetcher.h | 42 ++-- src/macro_utilities.h | 12 +- src/media_library.h | 50 ++--- src/menu.h | 26 +-- src/mutable_song.h | 26 +-- src/outputs.h | 16 +- src/playlist.h | 38 ++-- src/playlist_editor.h | 50 ++--- src/screen.h | 16 +- src/scrollpad.h | 8 +- src/search_engine.h | 58 +++--- src/sel_items_adder.h | 32 +-- src/server_info.h | 14 +- src/song_info.h | 14 +- src/song_list.h | 14 +- src/sort_playlist.h | 20 +- src/tag_editor.h | 62 +++--- src/tiny_tag_editor.h | 20 +- src/utility/conversion.h | 2 +- src/visualizer.h | 20 +- src/window.h | 2 +- 29 files changed, 551 insertions(+), 593 deletions(-) diff --git a/NEWS b/NEWS index 95b65db2..f98768fa 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ncmpcpp-0.8 (????-??-??) * Configuration variable 'execute_on_player_state_change' was added. * Support for controlling whether ncmpcpp should display multiple tags as-is or make an effort to hide duplicate values (show_duplicate_tags configuration variable, enabled by default). * Support for filtering of lists was brought back from the dead. +* Require C++14 compatible compiler during compilation. ncmpcpp-0.7.7 (2016-10-31) * Fixed compilation on 32bit platforms. diff --git a/configure.ac b/configure.ac index f24bba81..4b888c7a 100644 --- a/configure.ac +++ b/configure.ac @@ -28,70 +28,27 @@ if test "$clock" = "yes"; then fi dnl ================================ -dnl = checking for -std=c++0x flag = +dnl = checking for -std=c++14 flag = dnl ================================ -AC_MSG_CHECKING([whether compiler supports -std=c++0x]) +AC_MSG_CHECKING([whether compiler supports -std=c++14]) old_CXXFLAGS="$CXXFLAGS" -CXXFLAGS="-std=c++0x" +CXXFLAGS="-std=c++14" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]])], AC_MSG_RESULT([yes]) - std_cpp0x="-std=c++0x", + std_cpp14="-std=c++14", AC_MSG_RESULT([no]) - AC_MSG_ERROR([[Your compiler doesn't seem to support C++0x, please upgrade (GCC >= 4.6)]]) + AC_MSG_ERROR([[Your compiler doesn't seem to support C++14, please upgrade (GCC >= 5)]]) ) -CXXFLAGS="$old_CXXFLAGS $std_cpp0x" +CXXFLAGS="$old_CXXFLAGS $std_cpp14" -dnl ========================================== -dnl = checking for initializer lists support = -dnl ========================================== -AC_MSG_CHECKING([whether compiler supports initializer lists]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [[std::vector test = { 1, 2, 3 }; test.push_back(4);]])], +dnl =================================================== +dnl = checking for generic lambda expressions support = +dnl =================================================== +AC_MSG_CHECKING([whether compiler supports generic lambda expressions]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[auto f = [](auto n) { return n*n; }; f(7);]])], AC_MSG_RESULT([yes]), AC_MSG_RESULT([no]) - AC_MSG_ERROR([[Your compiler doesn't seem to support initializer lists, please upgrade (GCC >= 4.6)]]) -) - -dnl ===================================== -dnl = checking for auto keyword support = -dnl ===================================== -AC_MSG_CHECKING([whether compiler supports auto keyword]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[auto test = new int; *test = 1;]])], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_ERROR([[Your compiler doesn't seem to support auto keyword, please upgrade (GCC >= 4.6)]]) -) - -dnl ========================================= -dnl = checking for lambda functions support = -dnl ========================================= -AC_MSG_CHECKING([whether compiler supports lambda functions]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [[int a = 5; std::function f = [&a](int b) { return a + b; }; f(8);]])], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_ERROR([[Your compiler doesn't seem to support lambda functions, please upgrade (GCC >= 4.6)]]) -) - -dnl ================================================================ -dnl = checking whether calling derived member function of object = -dnl = passed to lambda without explicit 'this' usage works = -dnl ================================================================ -AC_MSG_CHECKING([whether calling derived member function passed to lambda without explicit this usage works ]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include ], [[struct A { void foo() { } }; struct B : public A { void bar() { std::function f = [this]() { foo(); }; f(); } } foo; foo.bar();]])], - AC_MSG_RESULT([yes]), - AC_MSG_RESULT([no]) - AC_MSG_ERROR([[Your compiler doesn't seem to support calling derived member function of an object passed to lambda as 'this' without explicit 'this' usage, please upgrade (GCC >= 4.6)]]) -) - -dnl ========================================= -dnl = checking for override keyword support = -dnl ========================================= -AH_TEMPLATE([OVERRIDE], [override keyword used in C++11]) -AC_MSG_CHECKING([whether compiler supports override keyword]) -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[struct A { virtual void foo() { } }; struct B : public A { virtual void foo() override { } };]], [])], - AC_MSG_RESULT([yes]) - AC_DEFINE([OVERRIDE], [override]), - AC_MSG_RESULT([no]) - AC_DEFINE([OVERRIDE], []), + AC_MSG_ERROR([[Your compiler doesn't seem to support generic lambda expressions, please upgrade (GCC >= 5)]]) ) dnl ============================= diff --git a/src/actions.h b/src/actions.h index 671aa0ee..d448ad04 100644 --- a/src/actions.h +++ b/src/actions.h @@ -222,7 +222,7 @@ struct Dummy: BaseAction Dummy(): BaseAction(Type::Dummy, "dummy") { } private: - virtual void run() OVERRIDE { } + virtual void run() override { } }; struct UpdateEnvironment: BaseAction @@ -234,7 +234,7 @@ struct UpdateEnvironment: BaseAction private: boost::posix_time::ptime m_past; - virtual void run() OVERRIDE; + virtual void run() override; }; struct MouseEvent: BaseAction @@ -246,8 +246,8 @@ struct MouseEvent: BaseAction } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; MEVENT m_mouse_event; MEVENT m_old_mouse_event; @@ -258,7 +258,7 @@ struct ScrollUp: BaseAction ScrollUp(): BaseAction(Type::ScrollUp, "scroll_up") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ScrollDown: BaseAction @@ -266,7 +266,7 @@ struct ScrollDown: BaseAction ScrollDown(): BaseAction(Type::ScrollDown, "scroll_down") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ScrollUpArtist: BaseAction @@ -274,8 +274,8 @@ struct ScrollUpArtist: BaseAction ScrollUpArtist(): BaseAction(Type::ScrollUpArtist, "scroll_up_artist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; SongList *m_songs; @@ -286,8 +286,8 @@ struct ScrollUpAlbum: BaseAction ScrollUpAlbum(): BaseAction(Type::ScrollUpAlbum, "scroll_up_album") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; SongList *m_songs; @@ -298,8 +298,8 @@ struct ScrollDownArtist: BaseAction ScrollDownArtist(): BaseAction(Type::ScrollDownArtist, "scroll_down_artist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; SongList *m_songs; @@ -310,8 +310,8 @@ struct ScrollDownAlbum: BaseAction ScrollDownAlbum(): BaseAction(Type::ScrollDownAlbum, "scroll_down_album") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; SongList *m_songs; @@ -322,7 +322,7 @@ struct PageUp: BaseAction PageUp(): BaseAction(Type::PageUp, "page_up") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct PageDown: BaseAction @@ -330,7 +330,7 @@ struct PageDown: BaseAction PageDown(): BaseAction(Type::PageDown, "page_down") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct MoveHome: BaseAction @@ -338,7 +338,7 @@ struct MoveHome: BaseAction MoveHome(): BaseAction(Type::MoveHome, "move_home") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct MoveEnd: BaseAction @@ -346,7 +346,7 @@ struct MoveEnd: BaseAction MoveEnd(): BaseAction(Type::MoveEnd, "move_end") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleInterface: BaseAction @@ -354,7 +354,7 @@ struct ToggleInterface: BaseAction ToggleInterface(): BaseAction(Type::ToggleInterface, "toggle_interface") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct JumpToParentDirectory: BaseAction @@ -362,8 +362,8 @@ struct JumpToParentDirectory: BaseAction JumpToParentDirectory(): BaseAction(Type::JumpToParentDirectory, "jump_to_parent_directory") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct RunAction: BaseAction @@ -371,8 +371,8 @@ struct RunAction: BaseAction RunAction(): BaseAction(Type::RunAction, "run_action") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; HasActions *m_ha; }; @@ -382,8 +382,8 @@ struct PreviousColumn: BaseAction PreviousColumn(): BaseAction(Type::PreviousColumn, "previous_column") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; HasColumns *m_hc; }; @@ -393,8 +393,8 @@ struct NextColumn: BaseAction NextColumn(): BaseAction(Type::NextColumn, "next_column") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; HasColumns *m_hc; }; @@ -404,8 +404,8 @@ struct MasterScreen: BaseAction MasterScreen(): BaseAction(Type::MasterScreen, "master_screen") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SlaveScreen: BaseAction @@ -413,8 +413,8 @@ struct SlaveScreen: BaseAction SlaveScreen(): BaseAction(Type::SlaveScreen, "slave_screen") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct VolumeUp: BaseAction @@ -422,7 +422,7 @@ struct VolumeUp: BaseAction VolumeUp(): BaseAction(Type::VolumeUp, "volume_up") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct VolumeDown: BaseAction @@ -430,7 +430,7 @@ struct VolumeDown: BaseAction VolumeDown(): BaseAction(Type::VolumeDown, "volume_down") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct AddItemToPlaylist: BaseAction @@ -438,8 +438,8 @@ struct AddItemToPlaylist: BaseAction AddItemToPlaylist(): BaseAction(Type::AddItemToPlaylist, "add_item_to_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; HasSongs *m_hs; }; @@ -449,8 +449,8 @@ struct PlayItem: BaseAction PlayItem(): BaseAction(Type::PlayItem, "play_item") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; HasSongs *m_hs; }; @@ -460,8 +460,8 @@ struct DeletePlaylistItems: BaseAction DeletePlaylistItems(): BaseAction(Type::DeletePlaylistItems, "delete_playlist_items") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct DeleteStoredPlaylist: BaseAction @@ -469,8 +469,8 @@ struct DeleteStoredPlaylist: BaseAction DeleteStoredPlaylist(): BaseAction(Type::DeleteStoredPlaylist, "delete_stored_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct DeleteBrowserItems: BaseAction @@ -478,8 +478,8 @@ struct DeleteBrowserItems: BaseAction DeleteBrowserItems(): BaseAction(Type::DeleteBrowserItems, "delete_browser_items") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ReplaySong: BaseAction @@ -487,7 +487,7 @@ struct ReplaySong: BaseAction ReplaySong(): BaseAction(Type::ReplaySong, "replay_song") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct PreviousSong: BaseAction @@ -495,7 +495,7 @@ struct PreviousSong: BaseAction PreviousSong(): BaseAction(Type::Previous, "previous") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct NextSong: BaseAction @@ -503,7 +503,7 @@ struct NextSong: BaseAction NextSong(): BaseAction(Type::Next, "next") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct Pause: BaseAction @@ -511,7 +511,7 @@ struct Pause: BaseAction Pause(): BaseAction(Type::Pause, "pause") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct Stop: BaseAction @@ -519,7 +519,7 @@ struct Stop: BaseAction Stop(): BaseAction(Type::Stop, "stop") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ExecuteCommand: BaseAction @@ -527,7 +527,7 @@ struct ExecuteCommand: BaseAction ExecuteCommand(): BaseAction(Type::ExecuteCommand, "execute_command") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct SavePlaylist: BaseAction @@ -535,7 +535,7 @@ struct SavePlaylist: BaseAction SavePlaylist(): BaseAction(Type::SavePlaylist, "save_playlist") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct MoveSortOrderUp: BaseAction @@ -543,8 +543,8 @@ struct MoveSortOrderUp: BaseAction MoveSortOrderUp(): BaseAction(Type::MoveSortOrderUp, "move_sort_order_up") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct MoveSortOrderDown: BaseAction @@ -552,8 +552,8 @@ struct MoveSortOrderDown: BaseAction MoveSortOrderDown(): BaseAction(Type::MoveSortOrderDown, "move_sort_order_down") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct MoveSelectedItemsUp: BaseAction @@ -561,8 +561,8 @@ struct MoveSelectedItemsUp: BaseAction MoveSelectedItemsUp(): BaseAction(Type::MoveSelectedItemsUp, "move_selected_items_up") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct MoveSelectedItemsDown: BaseAction @@ -570,8 +570,8 @@ struct MoveSelectedItemsDown: BaseAction MoveSelectedItemsDown(): BaseAction(Type::MoveSelectedItemsDown, "move_selected_items_down") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct MoveSelectedItemsTo: BaseAction @@ -579,8 +579,8 @@ struct MoveSelectedItemsTo: BaseAction MoveSelectedItemsTo(): BaseAction(Type::MoveSelectedItemsTo, "move_selected_items_to") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct Add: BaseAction @@ -588,8 +588,8 @@ struct Add: BaseAction Add(): BaseAction(Type::Add, "add") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SeekForward: BaseAction @@ -597,8 +597,8 @@ struct SeekForward: BaseAction SeekForward(): BaseAction(Type::SeekForward, "seek_forward") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SeekBackward: BaseAction @@ -606,8 +606,8 @@ struct SeekBackward: BaseAction SeekBackward(): BaseAction(Type::SeekBackward, "seek_backward") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleDisplayMode: BaseAction @@ -615,8 +615,8 @@ struct ToggleDisplayMode: BaseAction ToggleDisplayMode(): BaseAction(Type::ToggleDisplayMode, "toggle_display_mode") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleSeparatorsBetweenAlbums: BaseAction @@ -625,8 +625,8 @@ struct ToggleSeparatorsBetweenAlbums: BaseAction : BaseAction(Type::ToggleSeparatorsBetweenAlbums, "toggle_separators_between_albums") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleLyricsUpdateOnSongChange: BaseAction @@ -635,8 +635,8 @@ struct ToggleLyricsUpdateOnSongChange: BaseAction : BaseAction(Type::ToggleLyricsUpdateOnSongChange, "toggle_lyrics_update_on_song_change") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleLyricsFetcher: BaseAction @@ -645,9 +645,9 @@ struct ToggleLyricsFetcher: BaseAction private: # ifndef HAVE_CURL_CURL_H - virtual bool canBeRun() OVERRIDE; + virtual bool canBeRun() override; # endif // NOT HAVE_CURL_CURL_H - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleFetchingLyricsInBackground: BaseAction @@ -657,9 +657,9 @@ struct ToggleFetchingLyricsInBackground: BaseAction private: # ifndef HAVE_CURL_CURL_H - virtual bool canBeRun() OVERRIDE; + virtual bool canBeRun() override; # endif // NOT HAVE_CURL_CURL_H - virtual void run() OVERRIDE; + virtual void run() override; }; struct TogglePlayingSongCentering: BaseAction @@ -668,7 +668,7 @@ struct TogglePlayingSongCentering: BaseAction : BaseAction(Type::TogglePlayingSongCentering, "toggle_playing_song_centering") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct UpdateDatabase: BaseAction @@ -676,7 +676,7 @@ struct UpdateDatabase: BaseAction UpdateDatabase(): BaseAction(Type::UpdateDatabase, "update_database") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct JumpToPlayingSong: BaseAction @@ -684,8 +684,8 @@ struct JumpToPlayingSong: BaseAction JumpToPlayingSong(): BaseAction(Type::JumpToPlayingSong, "jump_to_playing_song") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleRepeat: BaseAction @@ -693,7 +693,7 @@ struct ToggleRepeat: BaseAction ToggleRepeat(): BaseAction(Type::ToggleRepeat, "toggle_repeat") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct Shuffle: BaseAction @@ -701,8 +701,8 @@ struct Shuffle: BaseAction Shuffle(): BaseAction(Type::Shuffle, "shuffle") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::Menu::ConstIterator m_begin; NC::Menu::ConstIterator m_end; @@ -713,7 +713,7 @@ struct ToggleRandom: BaseAction ToggleRandom(): BaseAction(Type::ToggleRandom, "toggle_random") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct StartSearching: BaseAction @@ -721,8 +721,8 @@ struct StartSearching: BaseAction StartSearching(): BaseAction(Type::StartSearching, "start_searching") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SaveTagChanges: BaseAction @@ -730,8 +730,8 @@ struct SaveTagChanges: BaseAction SaveTagChanges(): BaseAction(Type::SaveTagChanges, "save_tag_changes") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleSingle: BaseAction @@ -739,7 +739,7 @@ struct ToggleSingle: BaseAction ToggleSingle(): BaseAction(Type::ToggleSingle, "toggle_single") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleConsume: BaseAction @@ -747,7 +747,7 @@ struct ToggleConsume: BaseAction ToggleConsume(): BaseAction(Type::ToggleConsume, "toggle_consume") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleCrossfade: BaseAction @@ -755,7 +755,7 @@ struct ToggleCrossfade: BaseAction ToggleCrossfade(): BaseAction(Type::ToggleCrossfade, "toggle_crossfade") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct SetCrossfade: BaseAction @@ -763,7 +763,7 @@ struct SetCrossfade: BaseAction SetCrossfade(): BaseAction(Type::SetCrossfade, "set_crossfade") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct SetVolume: BaseAction @@ -771,7 +771,7 @@ struct SetVolume: BaseAction SetVolume(): BaseAction(Type::SetVolume, "set_volume") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct EnterDirectory: BaseAction @@ -779,8 +779,8 @@ struct EnterDirectory: BaseAction EnterDirectory(): BaseAction(Type::EnterDirectory, "enter_directory") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; @@ -789,8 +789,8 @@ struct EditSong: BaseAction EditSong(): BaseAction(Type::EditSong, "edit_song") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; #ifdef HAVE_TAGLIB_H const MPD::Song *m_song; @@ -802,8 +802,8 @@ struct EditLibraryTag: BaseAction EditLibraryTag(): BaseAction(Type::EditLibraryTag, "edit_library_tag") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct EditLibraryAlbum: BaseAction @@ -811,8 +811,8 @@ struct EditLibraryAlbum: BaseAction EditLibraryAlbum(): BaseAction(Type::EditLibraryAlbum, "edit_library_album") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct EditDirectoryName: BaseAction @@ -820,8 +820,8 @@ struct EditDirectoryName: BaseAction EditDirectoryName(): BaseAction(Type::EditDirectoryName, "edit_directory_name") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct EditPlaylistName: BaseAction @@ -829,8 +829,8 @@ struct EditPlaylistName: BaseAction EditPlaylistName(): BaseAction(Type::EditPlaylistName, "edit_playlist_name") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct EditLyrics: BaseAction @@ -838,8 +838,8 @@ struct EditLyrics: BaseAction EditLyrics(): BaseAction(Type::EditLyrics, "edit_lyrics") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct JumpToBrowser: BaseAction @@ -847,8 +847,8 @@ struct JumpToBrowser: BaseAction JumpToBrowser(): BaseAction(Type::JumpToBrowser, "jump_to_browser") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; const MPD::Song *m_song; }; @@ -858,8 +858,8 @@ struct JumpToMediaLibrary: BaseAction JumpToMediaLibrary(): BaseAction(Type::JumpToMediaLibrary, "jump_to_media_library") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; const MPD::Song *m_song; }; @@ -869,8 +869,8 @@ struct JumpToPlaylistEditor: BaseAction JumpToPlaylistEditor(): BaseAction(Type::JumpToPlaylistEditor, "jump_to_playlist_editor") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleScreenLock: BaseAction @@ -878,7 +878,7 @@ struct ToggleScreenLock: BaseAction ToggleScreenLock(): BaseAction(Type::ToggleScreenLock, "toggle_screen_lock") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct JumpToTagEditor: BaseAction @@ -886,8 +886,8 @@ struct JumpToTagEditor: BaseAction JumpToTagEditor(): BaseAction(Type::JumpToTagEditor, "jump_to_tag_editor") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; #ifdef HAVE_TAGLIB_H const MPD::Song *m_song; @@ -899,8 +899,8 @@ struct JumpToPositionInSong: BaseAction JumpToPositionInSong(): BaseAction(Type::JumpToPositionInSong, "jump_to_position_in_song") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SelectItem: BaseAction @@ -908,8 +908,8 @@ struct SelectItem: BaseAction SelectItem(): BaseAction(Type::SelectItem, "select_item") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; }; @@ -919,8 +919,8 @@ struct SelectRange: BaseAction SelectRange(): BaseAction(Type::SelectRange, "select_range") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; NC::List::Iterator m_begin; @@ -932,8 +932,8 @@ struct ReverseSelection: BaseAction ReverseSelection(): BaseAction(Type::ReverseSelection, "reverse_selection") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; }; @@ -943,8 +943,8 @@ struct RemoveSelection: BaseAction RemoveSelection(): BaseAction(Type::RemoveSelection, "remove_selection") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; }; @@ -954,8 +954,8 @@ struct SelectAlbum: BaseAction SelectAlbum(): BaseAction(Type::SelectAlbum, "select_album") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; SongList *m_songs; @@ -966,8 +966,8 @@ struct SelectFoundItems: BaseAction SelectFoundItems(): BaseAction(Type::SelectFoundItems, "select_found_items") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::List *m_list; Searchable *m_searchable; @@ -978,8 +978,8 @@ struct AddSelectedItems: BaseAction AddSelectedItems(): BaseAction(Type::AddSelectedItems, "add_selected_items") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct CropMainPlaylist: BaseAction @@ -987,7 +987,7 @@ struct CropMainPlaylist: BaseAction CropMainPlaylist(): BaseAction(Type::CropMainPlaylist, "crop_main_playlist") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct CropPlaylist: BaseAction @@ -995,8 +995,8 @@ struct CropPlaylist: BaseAction CropPlaylist(): BaseAction(Type::CropPlaylist, "crop_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ClearMainPlaylist: BaseAction @@ -1004,7 +1004,7 @@ struct ClearMainPlaylist: BaseAction ClearMainPlaylist(): BaseAction(Type::ClearMainPlaylist, "clear_main_playlist") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ClearPlaylist: BaseAction @@ -1012,8 +1012,8 @@ struct ClearPlaylist: BaseAction ClearPlaylist(): BaseAction(Type::ClearPlaylist, "clear_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SortPlaylist: BaseAction @@ -1021,8 +1021,8 @@ struct SortPlaylist: BaseAction SortPlaylist(): BaseAction(Type::SortPlaylist, "sort_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ReversePlaylist: BaseAction @@ -1030,8 +1030,8 @@ struct ReversePlaylist: BaseAction ReversePlaylist(): BaseAction(Type::ReversePlaylist, "reverse_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; NC::Menu::ConstIterator m_begin; NC::Menu::ConstIterator m_end; @@ -1042,8 +1042,8 @@ struct ApplyFilter: public BaseAction ApplyFilter(): BaseAction(Type::ApplyFilter, "apply_filter") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; Filterable *m_filterable; }; @@ -1053,8 +1053,8 @@ struct Find: BaseAction Find(): BaseAction(Type::Find, "find") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct FindItemForward: BaseAction @@ -1062,8 +1062,8 @@ struct FindItemForward: BaseAction FindItemForward(): BaseAction(Type::FindItemForward, "find_item_forward") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct FindItemBackward: BaseAction @@ -1071,8 +1071,8 @@ struct FindItemBackward: BaseAction FindItemBackward(): BaseAction(Type::FindItemBackward, "find_item_backward") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct NextFoundItem: BaseAction @@ -1080,8 +1080,8 @@ struct NextFoundItem: BaseAction NextFoundItem(): BaseAction(Type::NextFoundItem, "next_found_item") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct PreviousFoundItem: BaseAction @@ -1089,8 +1089,8 @@ struct PreviousFoundItem: BaseAction PreviousFoundItem(): BaseAction(Type::PreviousFoundItem, "previous_found_item") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleFindMode: BaseAction @@ -1098,7 +1098,7 @@ struct ToggleFindMode: BaseAction ToggleFindMode(): BaseAction(Type::ToggleFindMode, "toggle_find_mode") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleReplayGainMode: BaseAction @@ -1106,7 +1106,7 @@ struct ToggleReplayGainMode: BaseAction ToggleReplayGainMode(): BaseAction(Type::ToggleReplayGainMode, "toggle_replay_gain_mode") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleAddMode: BaseAction @@ -1114,7 +1114,7 @@ struct ToggleAddMode: BaseAction ToggleAddMode(): BaseAction(Type::ToggleAddMode, "toggle_add_mode") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleMouse: BaseAction @@ -1122,7 +1122,7 @@ struct ToggleMouse: BaseAction ToggleMouse(): BaseAction(Type::ToggleMouse, "toggle_mouse") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleBitrateVisibility: BaseAction @@ -1130,7 +1130,7 @@ struct ToggleBitrateVisibility: BaseAction ToggleBitrateVisibility(): BaseAction(Type::ToggleBitrateVisibility, "toggle_bitrate_visibility") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct AddRandomItems: BaseAction @@ -1138,7 +1138,7 @@ struct AddRandomItems: BaseAction AddRandomItems(): BaseAction(Type::AddRandomItems, "add_random_items") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ToggleBrowserSortMode: BaseAction @@ -1146,8 +1146,8 @@ struct ToggleBrowserSortMode: BaseAction ToggleBrowserSortMode(): BaseAction(Type::ToggleBrowserSortMode, "toggle_browser_sort_mode") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleLibraryTagType: BaseAction @@ -1155,8 +1155,8 @@ struct ToggleLibraryTagType: BaseAction ToggleLibraryTagType(): BaseAction(Type::ToggleLibraryTagType, "toggle_library_tag_type") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleMediaLibrarySortMode: BaseAction @@ -1165,8 +1165,8 @@ struct ToggleMediaLibrarySortMode: BaseAction : BaseAction(Type::ToggleMediaLibrarySortMode, "toggle_media_library_sort_mode") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct RefetchLyrics: BaseAction @@ -1174,8 +1174,8 @@ struct RefetchLyrics: BaseAction RefetchLyrics(): BaseAction(Type::RefetchLyrics, "refetch_lyrics") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SetSelectedItemsPriority: BaseAction @@ -1184,8 +1184,8 @@ struct SetSelectedItemsPriority: BaseAction : BaseAction(Type::SetSelectedItemsPriority, "set_selected_items_priority") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleOutput: BaseAction @@ -1193,8 +1193,8 @@ struct ToggleOutput: BaseAction ToggleOutput(): BaseAction(Type::ToggleOutput, "toggle_output") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleVisualizationType: BaseAction @@ -1204,8 +1204,8 @@ struct ToggleVisualizationType: BaseAction private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct SetVisualizerSampleMultiplier: BaseAction @@ -1214,8 +1214,8 @@ struct SetVisualizerSampleMultiplier: BaseAction : BaseAction(Type::SetVisualizerSampleMultiplier, "set_visualizer_sample_multiplier") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowSongInfo: BaseAction @@ -1223,7 +1223,7 @@ struct ShowSongInfo: BaseAction ShowSongInfo(): BaseAction(Type::ShowSongInfo, "show_song_info") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ShowArtistInfo: BaseAction @@ -1231,8 +1231,8 @@ struct ShowArtistInfo: BaseAction ShowArtistInfo(): BaseAction(Type::ShowArtistInfo, "show_artist_info") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowLyrics: BaseAction @@ -1240,7 +1240,7 @@ struct ShowLyrics: BaseAction ShowLyrics(): BaseAction(Type::ShowLyrics, "show_lyrics") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct Quit: BaseAction @@ -1248,7 +1248,7 @@ struct Quit: BaseAction Quit(): BaseAction(Type::Quit, "quit") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct NextScreen: BaseAction @@ -1256,7 +1256,7 @@ struct NextScreen: BaseAction NextScreen(): BaseAction(Type::NextScreen, "next_screen") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct PreviousScreen: BaseAction @@ -1264,7 +1264,7 @@ struct PreviousScreen: BaseAction PreviousScreen(): BaseAction(Type::PreviousScreen, "previous_screen") { } private: - virtual void run() OVERRIDE; + virtual void run() override; }; struct ShowHelp: BaseAction @@ -1272,8 +1272,8 @@ struct ShowHelp: BaseAction ShowHelp(): BaseAction(Type::ShowHelp, "show_help") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowPlaylist: BaseAction @@ -1281,8 +1281,8 @@ struct ShowPlaylist: BaseAction ShowPlaylist(): BaseAction(Type::ShowPlaylist, "show_playlist") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowBrowser: BaseAction @@ -1290,8 +1290,8 @@ struct ShowBrowser: BaseAction ShowBrowser(): BaseAction(Type::ShowBrowser, "show_browser") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ChangeBrowseMode: BaseAction @@ -1299,8 +1299,8 @@ struct ChangeBrowseMode: BaseAction ChangeBrowseMode(): BaseAction(Type::ChangeBrowseMode, "change_browse_mode") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowSearchEngine: BaseAction @@ -1308,8 +1308,8 @@ struct ShowSearchEngine: BaseAction ShowSearchEngine(): BaseAction(Type::ShowSearchEngine, "show_search_engine") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ResetSearchEngine: BaseAction @@ -1317,8 +1317,8 @@ struct ResetSearchEngine: BaseAction ResetSearchEngine(): BaseAction(Type::ResetSearchEngine, "reset_search_engine") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowMediaLibrary: BaseAction @@ -1326,8 +1326,8 @@ struct ShowMediaLibrary: BaseAction ShowMediaLibrary(): BaseAction(Type::ShowMediaLibrary, "show_media_library") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ToggleMediaLibraryColumnsMode: BaseAction @@ -1336,8 +1336,8 @@ struct ToggleMediaLibraryColumnsMode: BaseAction : BaseAction(Type::ToggleMediaLibraryColumnsMode, "toggle_media_library_columns_mode") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowPlaylistEditor: BaseAction @@ -1345,8 +1345,8 @@ struct ShowPlaylistEditor: BaseAction ShowPlaylistEditor(): BaseAction(Type::ShowPlaylistEditor, "show_playlist_editor") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowTagEditor: BaseAction @@ -1354,8 +1354,8 @@ struct ShowTagEditor: BaseAction ShowTagEditor(): BaseAction(Type::ShowTagEditor, "show_tag_editor") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowOutputs: BaseAction @@ -1363,8 +1363,8 @@ struct ShowOutputs: BaseAction ShowOutputs(): BaseAction(Type::ShowOutputs, "show_outputs") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowVisualizer: BaseAction @@ -1372,8 +1372,8 @@ struct ShowVisualizer: BaseAction ShowVisualizer(): BaseAction(Type::ShowVisualizer, "show_visualizer") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowClock: BaseAction @@ -1381,8 +1381,8 @@ struct ShowClock: BaseAction ShowClock(): BaseAction(Type::ShowClock, "show_clock") { } private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE; + virtual bool canBeRun() override; + virtual void run() override; }; struct ShowServerInfo: BaseAction @@ -1391,9 +1391,9 @@ struct ShowServerInfo: BaseAction private: # ifdef HAVE_TAGLIB_H - virtual bool canBeRun() OVERRIDE; + virtual bool canBeRun() override; # endif // HAVE_TAGLIB_H - virtual void run() OVERRIDE; + virtual void run() override; }; } diff --git a/src/browser.h b/src/browser.h index 62e45fbe..c94a0fb1 100644 --- a/src/browser.h +++ b/src/browser.h @@ -33,14 +33,14 @@ struct BrowserWindow: NC::Menu, SongList BrowserWindow(NC::Menu &&base) : NC::Menu(std::move(base)) { } - virtual SongIterator currentS() OVERRIDE; - virtual ConstSongIterator currentS() const OVERRIDE; - virtual SongIterator beginS() OVERRIDE; - virtual ConstSongIterator beginS() const OVERRIDE; - virtual SongIterator endS() OVERRIDE; - virtual ConstSongIterator endS() const OVERRIDE; + virtual SongIterator currentS() override; + virtual ConstSongIterator currentS() const override; + virtual SongIterator beginS() override; + virtual ConstSongIterator beginS() const override; + virtual SongIterator endS() override; + virtual ConstSongIterator endS() const override; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual std::vector getSelectedSongs() override; }; struct Browser: Screen, Filterable, HasSongs, Searchable, Tabbable @@ -48,35 +48,35 @@ struct Browser: Screen, Filterable, HasSongs, Searchable, Tabbabl Browser(); // Screen implementation - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Browser; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Browser; } - virtual void update() OVERRIDE; + virtual void update() override; - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; // Filterable implemenetation - virtual bool allowsFiltering() OVERRIDE; - virtual std::string currentFilter() OVERRIDE; - virtual void applyFilter(const std::string &filter) OVERRIDE; + virtual bool allowsFiltering() override; + virtual std::string currentFilter() override; + virtual void applyFilter(const std::string &filter) override; // HasSongs implementation - virtual bool itemAvailable() OVERRIDE; - virtual bool addItemToPlaylist(bool play) OVERRIDE; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual bool itemAvailable() override; + virtual bool addItemToPlaylist(bool play) override; + virtual std::vector getSelectedSongs() override; // private members void requestUpdate() { m_update_request = true; } diff --git a/src/clock.h b/src/clock.h index 2ac4f98e..5246c632 100644 --- a/src/clock.h +++ b/src/clock.h @@ -33,19 +33,19 @@ struct Clock: Screen, Tabbable { Clock(); - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Clock; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Clock; } - virtual void update() OVERRIDE; - virtual void scroll(NC::Scroll) OVERRIDE { } + virtual void update() override; + virtual void scroll(NC::Scroll) override { } - virtual void mouseButtonPressed(MEVENT) OVERRIDE { } + virtual void mouseButtonPressed(MEVENT) override { } - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return true; } private: NC::Window m_pane; diff --git a/src/help.h b/src/help.h index b715f3df..790175b2 100644 --- a/src/help.h +++ b/src/help.h @@ -29,16 +29,16 @@ struct Help: Screen, Tabbable { Help(); - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Help; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Help; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } }; extern Help *myHelp; diff --git a/src/lastfm.h b/src/lastfm.h index 8903447d..c25c98ba 100644 --- a/src/lastfm.h +++ b/src/lastfm.h @@ -37,16 +37,16 @@ struct Lastfm: Screen, Tabbable { Lastfm(); - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Lastfm; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Lastfm; } - virtual void update() OVERRIDE; + virtual void update() override; - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return true; } template void queueJob(ServiceT *service) diff --git a/src/lyrics.h b/src/lyrics.h index a37ea262..c7a2fff5 100644 --- a/src/lyrics.h +++ b/src/lyrics.h @@ -34,16 +34,16 @@ struct Lyrics: Screen, Tabbable Lyrics(); // Screen implementation - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Lyrics; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Lyrics; } - virtual void update() OVERRIDE; + virtual void update() override; - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return true; } // private members bool SetSong(const MPD::Song &s); diff --git a/src/lyrics_fetcher.h b/src/lyrics_fetcher.h index 9cafbfb5..0e8fbf35 100644 --- a/src/lyrics_fetcher.h +++ b/src/lyrics_fetcher.h @@ -48,14 +48,14 @@ protected: struct LyricwikiFetcher : public LyricsFetcher { - virtual const char *name() const OVERRIDE { return "lyricwiki.com"; } - virtual Result fetch(const std::string &artist, const std::string &title) OVERRIDE; + virtual const char *name() const override { return "lyricwiki.com"; } + virtual Result fetch(const std::string &artist, const std::string &title) override; protected: - virtual const char *urlTemplate() const OVERRIDE { return "http://lyrics.wikia.com/api.php?action=lyrics&fmt=xml&func=getSong&artist=%artist%&song=%title%"; } - virtual const char *regex() const OVERRIDE { return "(.*?)"; } + virtual const char *urlTemplate() const override { return "http://lyrics.wikia.com/api.php?action=lyrics&fmt=xml&func=getSong&artist=%artist%&song=%title%"; } + virtual const char *regex() const override { return "(.*?)"; } - virtual bool notLyrics(const std::string &data) const OVERRIDE; + virtual bool notLyrics(const std::string &data) const override; }; /**********************************************************************/ @@ -76,56 +76,56 @@ private: struct MetrolyricsFetcher : public GoogleLyricsFetcher { - virtual const char *name() const OVERRIDE { return "metrolyrics.com"; } + virtual const char *name() const override { return "metrolyrics.com"; } protected: - virtual const char *regex() const OVERRIDE { return "
(.*?)
"; } + virtual const char *regex() const override { return "
(.*?)
"; } - virtual bool isURLOk(const std::string &url) OVERRIDE; + virtual bool isURLOk(const std::string &url) override; }; struct LyricsmaniaFetcher : public GoogleLyricsFetcher { - virtual const char *name() const OVERRIDE { return "lyricsmania.com"; } + virtual const char *name() const override { return "lyricsmania.com"; } protected: - virtual const char *regex() const OVERRIDE { return "
(.*?)
"; } + virtual const char *regex() const override { return "
(.*?)
"; } }; struct Sing365Fetcher : public GoogleLyricsFetcher { - virtual const char *name() const OVERRIDE { return "sing365.com"; } + virtual const char *name() const override { return "sing365.com"; } protected: - virtual const char *regex() const OVERRIDE { return "(.*?)"; } + virtual const char *regex() const override { return "(.*?)"; } }; struct JustSomeLyricsFetcher : public GoogleLyricsFetcher { - virtual const char *name() const OVERRIDE { return "justsomelyrics.com"; } + virtual const char *name() const override { return "justsomelyrics.com"; } protected: - virtual const char *regex() const OVERRIDE { return "
\\s*
(.*?)\\s*(.*?).*?.*
(.*?)
"; } + virtual const char *regex() const override { return "
.*?.*
(.*?)
"; } }; struct InternetLyricsFetcher : public GoogleLyricsFetcher { - virtual const char *name() const OVERRIDE { return "the Internet"; } - virtual Result fetch(const std::string &artist, const std::string &title) OVERRIDE; + virtual const char *name() const override { return "the Internet"; } + virtual Result fetch(const std::string &artist, const std::string &title) override; protected: - virtual const char *siteKeyword() const OVERRIDE { return "lyrics"; } - virtual const char *regex() const OVERRIDE { return ""; } + virtual const char *siteKeyword() const override { return "lyrics"; } + virtual const char *regex() const override { return ""; } - virtual bool isURLOk(const std::string &url) OVERRIDE; + virtual bool isURLOk(const std::string &url) override; private: std::string URL; diff --git a/src/macro_utilities.h b/src/macro_utilities.h index dd864691..53a43c4f 100644 --- a/src/macro_utilities.h +++ b/src/macro_utilities.h @@ -32,7 +32,7 @@ struct PushCharacters: BaseAction PushCharacters(NC::Window **w, std::vector &&queue); private: - virtual void run() OVERRIDE; + virtual void run() override; NC::Window **m_window; std::vector m_queue; @@ -43,8 +43,8 @@ struct RequireRunnable: BaseAction RequireRunnable(BaseAction *action); private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE { } + virtual bool canBeRun() override; + virtual void run() override { } BaseAction *m_action; }; @@ -54,8 +54,8 @@ struct RequireScreen: BaseAction RequireScreen(ScreenType screen_type); private: - virtual bool canBeRun() OVERRIDE; - virtual void run() OVERRIDE { } + virtual bool canBeRun() override; + virtual void run() override { } ScreenType m_screen_type; }; @@ -65,7 +65,7 @@ struct RunExternalCommand: BaseAction RunExternalCommand(std::string command); private: - virtual void run() OVERRIDE; + virtual void run() override; std::string m_command; }; diff --git a/src/media_library.h b/src/media_library.h index da47f127..2d13b66a 100644 --- a/src/media_library.h +++ b/src/media_library.h @@ -32,45 +32,45 @@ struct MediaLibrary: Screen, Filterable, HasColumns, HasSongs, Sea { MediaLibrary(); - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::MediaLibrary; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::MediaLibrary; } - virtual void refresh() OVERRIDE; - virtual void update() OVERRIDE; + virtual void refresh() override; + virtual void update() override; - virtual int windowTimeout() OVERRIDE; + virtual int windowTimeout() override; - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; // Filterable implementation - virtual bool allowsFiltering() OVERRIDE; - virtual std::string currentFilter() OVERRIDE; - virtual void applyFilter(const std::string &filter) OVERRIDE; + virtual bool allowsFiltering() override; + virtual std::string currentFilter() override; + virtual void applyFilter(const std::string &filter) override; // HasSongs implementation - virtual bool itemAvailable() OVERRIDE; - virtual bool addItemToPlaylist(bool play) OVERRIDE; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual bool itemAvailable() override; + virtual bool addItemToPlaylist(bool play) override; + virtual std::vector getSelectedSongs() override; // HasColumns implementation - virtual bool previousColumnAvailable() OVERRIDE; - virtual void previousColumn() OVERRIDE; + virtual bool previousColumnAvailable() override; + virtual void previousColumn() override; - virtual bool nextColumnAvailable() OVERRIDE; - virtual void nextColumn() OVERRIDE; + virtual bool nextColumnAvailable() override; + virtual void nextColumn() override; // other members void updateTimer(); diff --git a/src/menu.h b/src/menu.h index 02972996..c99c7e68 100644 --- a/src/menu.h +++ b/src/menu.h @@ -314,30 +314,30 @@ struct Menu: Window, List /// Checks if list is empty /// @return true if list is empty, false otherwise - virtual bool empty() const OVERRIDE { return m_items->empty(); } + virtual bool empty() const override { return m_items->empty(); } /// @return size of the list - virtual size_t size() const OVERRIDE { return m_items->size(); } + virtual size_t size() const override { return m_items->size(); } /// @return currently highlighted position - virtual size_t choice() const OVERRIDE; + virtual size_t choice() const override; /// Highlights given position /// @param pos position to be highlighted - virtual void highlight(size_t position) OVERRIDE; + virtual void highlight(size_t position) override; /// Refreshes the menu window /// @see Window::refresh() - virtual void refresh() OVERRIDE; + virtual void refresh() override; /// Scrolls by given amount of lines /// @param where indicated where exactly one wants to go /// @see Window::scroll() - virtual void scroll(Scroll where) OVERRIDE; + virtual void scroll(Scroll where) override; /// Cleares all options, used filters etc. It doesn't reset highlighted position though. /// @see reset() - virtual void clear() OVERRIDE; + virtual void clear() override; /// Sets highlighted position to 0 void reset(); @@ -468,22 +468,22 @@ struct Menu: Window, List ReverseValueIterator rendV() { return ReverseValueIterator(beginV()); } ConstReverseValueIterator rendV() const { return ConstReverseValueIterator(beginV()); } - virtual List::Iterator currentP() OVERRIDE { + virtual List::Iterator currentP() override { return List::Iterator(PropertiesIterator(m_items->begin() + m_highlight)); } - virtual List::ConstIterator currentP() const OVERRIDE { + virtual List::ConstIterator currentP() const override { return List::ConstIterator(ConstPropertiesIterator(m_items->begin() + m_highlight)); } - virtual List::Iterator beginP() OVERRIDE { + virtual List::Iterator beginP() override { return List::Iterator(PropertiesIterator(m_items->begin())); } - virtual List::ConstIterator beginP() const OVERRIDE { + virtual List::ConstIterator beginP() const override { return List::ConstIterator(ConstPropertiesIterator(m_items->begin())); } - virtual List::Iterator endP() OVERRIDE { + virtual List::Iterator endP() override { return List::Iterator(PropertiesIterator(m_items->end())); } - virtual List::ConstIterator endP() const OVERRIDE { + virtual List::ConstIterator endP() const override { return List::ConstIterator(ConstPropertiesIterator(m_items->end())); } diff --git a/src/mutable_song.h b/src/mutable_song.h index 8c6a5bd8..fa3d2024 100644 --- a/src/mutable_song.h +++ b/src/mutable_song.h @@ -34,17 +34,17 @@ struct MutableSong : public Song MutableSong() : m_mtime(0), m_duration(0) { } MutableSong(Song s) : Song(s), m_mtime(0), m_duration(0) { } - virtual std::string getArtist(unsigned idx = 0) const OVERRIDE; - virtual std::string getTitle(unsigned idx = 0) const OVERRIDE; - virtual std::string getAlbum(unsigned idx = 0) const OVERRIDE; - virtual std::string getAlbumArtist(unsigned idx = 0) const OVERRIDE; - virtual std::string getTrack(unsigned idx = 0) const OVERRIDE; - virtual std::string getDate(unsigned idx = 0) const OVERRIDE; - virtual std::string getGenre(unsigned idx = 0) const OVERRIDE; - virtual std::string getComposer(unsigned idx = 0) const OVERRIDE; - virtual std::string getPerformer(unsigned idx = 0) const OVERRIDE; - virtual std::string getDisc(unsigned idx = 0) const OVERRIDE; - virtual std::string getComment(unsigned idx = 0) const OVERRIDE; + virtual std::string getArtist(unsigned idx = 0) const override; + virtual std::string getTitle(unsigned idx = 0) const override; + virtual std::string getAlbum(unsigned idx = 0) const override; + virtual std::string getAlbumArtist(unsigned idx = 0) const override; + virtual std::string getTrack(unsigned idx = 0) const override; + virtual std::string getDate(unsigned idx = 0) const override; + virtual std::string getGenre(unsigned idx = 0) const override; + virtual std::string getComposer(unsigned idx = 0) const override; + virtual std::string getPerformer(unsigned idx = 0) const override; + virtual std::string getDisc(unsigned idx = 0) const override; + virtual std::string getComment(unsigned idx = 0) const override; void setArtist(const std::string &value, unsigned idx = 0); void setTitle(const std::string &value, unsigned idx = 0); @@ -61,8 +61,8 @@ struct MutableSong : public Song const std::string &getNewName() const; void setNewName(const std::string &value); - virtual unsigned getDuration() const OVERRIDE; - virtual time_t getMTime() const OVERRIDE; + virtual unsigned getDuration() const override; + virtual time_t getMTime() const override; void setDuration(unsigned duration); void setMTime(time_t mtime); diff --git a/src/outputs.h b/src/outputs.h index f767391e..838221da 100644 --- a/src/outputs.h +++ b/src/outputs.h @@ -35,18 +35,18 @@ struct Outputs: Screen>, Tabbable Outputs(); // Screen< NC::Menu > implementation - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Outputs; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Outputs; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // private members void fetchList(); diff --git a/src/playlist.h b/src/playlist.h index 329007bd..8f2a3ac8 100644 --- a/src/playlist.h +++ b/src/playlist.h @@ -35,35 +35,35 @@ struct Playlist: Screen, Filterable, HasSongs, Searchable, Tabbable Playlist(); // Screen implementation - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Playlist; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Playlist; } - virtual void update() OVERRIDE; + virtual void update() override; - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; // Filterable implementation - virtual bool allowsFiltering() OVERRIDE; - virtual std::string currentFilter() OVERRIDE; - virtual void applyFilter(const std::string &filter) OVERRIDE; + virtual bool allowsFiltering() override; + virtual std::string currentFilter() override; + virtual void applyFilter(const std::string &filter) override; // HasSongs implementation - virtual bool itemAvailable() OVERRIDE; - virtual bool addItemToPlaylist(bool play) OVERRIDE; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual bool itemAvailable() override; + virtual bool addItemToPlaylist(bool play) override; + virtual std::vector getSelectedSongs() override; // other members MPD::Song nowPlayingSong(); diff --git a/src/playlist_editor.h b/src/playlist_editor.h index f9268a65..f54eb1d0 100644 --- a/src/playlist_editor.h +++ b/src/playlist_editor.h @@ -32,45 +32,45 @@ struct PlaylistEditor: Screen, Filterable, HasColumns, HasSongs, S { PlaylistEditor(); - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::PlaylistEditor; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::PlaylistEditor; } - virtual void refresh() OVERRIDE; - virtual void update() OVERRIDE; + virtual void refresh() override; + virtual void update() override; - virtual int windowTimeout() OVERRIDE; + virtual int windowTimeout() override; - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; // Filterable implementation - virtual bool allowsFiltering() OVERRIDE; - virtual std::string currentFilter() OVERRIDE; - virtual void applyFilter(const std::string &filter) OVERRIDE; + virtual bool allowsFiltering() override; + virtual std::string currentFilter() override; + virtual void applyFilter(const std::string &filter) override; // HasSongs implementation - virtual bool itemAvailable() OVERRIDE; - virtual bool addItemToPlaylist(bool play) OVERRIDE; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual bool itemAvailable() override; + virtual bool addItemToPlaylist(bool play) override; + virtual std::vector getSelectedSongs() override; // HasColumns implementation - virtual bool previousColumnAvailable() OVERRIDE; - virtual void previousColumn() OVERRIDE; + virtual bool previousColumnAvailable() override; + virtual void previousColumn() override; - virtual bool nextColumnAvailable() OVERRIDE; - virtual void nextColumn() OVERRIDE; + virtual bool nextColumnAvailable() override; + virtual void nextColumn() override; // private members void updateTimer(); diff --git a/src/screen.h b/src/screen.h index ec98a666..a7fce575 100644 --- a/src/screen.h +++ b/src/screen.h @@ -152,7 +152,7 @@ public: virtual ~Screen() { } - virtual bool isActiveWindow(const NC::Window &w_) const OVERRIDE { + virtual bool isActiveWindow(const NC::Window &w_) const override { return &Accessor::constApply(w) == &w_; } @@ -160,20 +160,20 @@ public: /// it's useful to determine the one that is being /// active /// @return address to window object cast to void * - virtual NC::Window *activeWindow() OVERRIDE { + virtual NC::Window *activeWindow() override { return &Accessor::apply(w); } - virtual const NC::Window *activeWindow() const OVERRIDE { + virtual const NC::Window *activeWindow() const override { return &Accessor::constApply(w); } /// Refreshes whole screen - virtual void refresh() OVERRIDE { + virtual void refresh() override { Accessor::apply(w).display(); } /// Refreshes active window of the screen - virtual void refreshWindow() OVERRIDE { + virtual void refreshWindow() override { Accessor::apply(w).display(); } @@ -181,20 +181,20 @@ public: /// if fancy scrolling feature is disabled, enters the /// loop that holds main loop until user releases the key /// @param where indicates where one wants to scroll - virtual void scroll(NC::Scroll where) OVERRIDE { + virtual void scroll(NC::Scroll where) override { Accessor::apply(w).scroll(where); } /// @return timeout parameter used for the screen (in ms) /// @default defaultWindowTimeout - virtual int windowTimeout() OVERRIDE { + virtual int windowTimeout() override { return defaultWindowTimeout; } /// Invoked after there was one of mouse buttons pressed /// @param me struct that contains coords of where the click /// had its place and button actions - virtual void mouseButtonPressed(MEVENT me) OVERRIDE { + virtual void mouseButtonPressed(MEVENT me) override { genericMouseButtonPressed(Accessor::apply(w), me); } diff --git a/src/scrollpad.h b/src/scrollpad.h index 9fd6d345..8847972b 100644 --- a/src/scrollpad.h +++ b/src/scrollpad.h @@ -36,10 +36,10 @@ struct Scrollpad: public Window const std::string &title, Color color, Border border); // override a few Window functions - virtual void refresh() OVERRIDE; - virtual void scroll(Scroll where) OVERRIDE; - virtual void resize(size_t new_width, size_t new_height) OVERRIDE; - virtual void clear() OVERRIDE; + virtual void refresh() override; + virtual void scroll(Scroll where) override; + virtual void resize(size_t new_width, size_t new_height) override; + virtual void clear() override; const std::string &buffer(); diff --git a/src/search_engine.h b/src/search_engine.h index b260d826..0ea09fb6 100644 --- a/src/search_engine.h +++ b/src/search_engine.h @@ -81,14 +81,14 @@ struct SearchEngineWindow: NC::Menu, SongList SearchEngineWindow(NC::Menu &&base) : NC::Menu(std::move(base)) { } - virtual SongIterator currentS() OVERRIDE; - virtual ConstSongIterator currentS() const OVERRIDE; - virtual SongIterator beginS() OVERRIDE; - virtual ConstSongIterator beginS() const OVERRIDE; - virtual SongIterator endS() OVERRIDE; - virtual ConstSongIterator endS() const OVERRIDE; - - virtual std::vector getSelectedSongs() OVERRIDE; + virtual SongIterator currentS() override; + virtual ConstSongIterator currentS() const override; + virtual SongIterator beginS() override; + virtual ConstSongIterator beginS() const override; + virtual SongIterator endS() override; + virtual ConstSongIterator endS() const override; + + virtual std::vector getSelectedSongs() override; }; struct SearchEngine: Screen, Filterable, HasActions, HasSongs, Searchable, Tabbable @@ -96,39 +96,39 @@ struct SearchEngine: Screen, Filterable, HasActions, HasSong SearchEngine(); // Screen implementation - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::SearchEngine; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::SearchEngine; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; // Filterable implementation - virtual bool allowsFiltering() OVERRIDE; - virtual std::string currentFilter() OVERRIDE; - virtual void applyFilter(const std::string &filter) OVERRIDE; + virtual bool allowsFiltering() override; + virtual std::string currentFilter() override; + virtual void applyFilter(const std::string &filter) override; // HasActions implementation - virtual bool actionRunnable() OVERRIDE; - virtual void runAction() OVERRIDE; + virtual bool actionRunnable() override; + virtual void runAction() override; // HasSongs implementation - virtual bool itemAvailable() OVERRIDE; - virtual bool addItemToPlaylist(bool play) OVERRIDE; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual bool itemAvailable() override; + virtual bool addItemToPlaylist(bool play) override; + virtual std::vector getSelectedSongs() override; // private members void reset(); diff --git a/src/sel_items_adder.h b/src/sel_items_adder.h index 6dc991b9..2bb05ca1 100644 --- a/src/sel_items_adder.h +++ b/src/sel_items_adder.h @@ -35,30 +35,30 @@ struct SelectedItemsAdder: Screen> *> SelectedItemsAdder(); - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; - virtual void refresh() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; + virtual void refresh() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::SelectedItemsAdder; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::SelectedItemsAdder; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return false; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return false; } // HasActions implementation - virtual bool actionRunnable() OVERRIDE; - virtual void runAction() OVERRIDE; + virtual bool actionRunnable() override; + virtual void runAction() override; // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; private: void populatePlaylistSelector(BaseScreen *screen); diff --git a/src/server_info.h b/src/server_info.h index 4efc95df..00b7099c 100644 --- a/src/server_info.h +++ b/src/server_info.h @@ -31,16 +31,16 @@ struct ServerInfo: Screen, Tabbable ServerInfo(); // Screen implementation - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::ServerInfo; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::ServerInfo; } - virtual void update() OVERRIDE; + virtual void update() override; - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return false; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return false; } private: void SetDimensions(); diff --git a/src/song_info.h b/src/song_info.h index 95f974d8..8135d671 100644 --- a/src/song_info.h +++ b/src/song_info.h @@ -37,16 +37,16 @@ struct SongInfo: Screen, Tabbable SongInfo(); // Screen implementation - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::SongInfo; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::SongInfo; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return true; } // private members static const Metadata Tags[]; diff --git a/src/song_list.h b/src/song_list.h index 42cb144f..309ff970 100644 --- a/src/song_list.h +++ b/src/song_list.h @@ -65,14 +65,14 @@ struct SongMenu: NC::Menu, SongList SongMenu(NC::Menu &&base) : NC::Menu(std::move(base)) { } - virtual SongIterator currentS() OVERRIDE; - virtual ConstSongIterator currentS() const OVERRIDE; - virtual SongIterator beginS() OVERRIDE; - virtual ConstSongIterator beginS() const OVERRIDE; - virtual SongIterator endS() OVERRIDE; - virtual ConstSongIterator endS() const OVERRIDE; + virtual SongIterator currentS() override; + virtual ConstSongIterator currentS() const override; + virtual SongIterator beginS() override; + virtual ConstSongIterator beginS() const override; + virtual SongIterator endS() override; + virtual ConstSongIterator endS() const override; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual std::vector getSelectedSongs() override; }; #endif // NCMPCPP_SONG_LIST_H diff --git a/src/sort_playlist.h b/src/sort_playlist.h index 0befa94b..e49ca1f3 100644 --- a/src/sort_playlist.h +++ b/src/sort_playlist.h @@ -33,22 +33,22 @@ struct SortPlaylistDialog SortPlaylistDialog(); - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::SortPlaylistDialog; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::SortPlaylistDialog; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return false; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return false; } // HasActions implementation - virtual bool actionRunnable() OVERRIDE; - virtual void runAction() OVERRIDE; + virtual bool actionRunnable() override; + virtual void runAction() override; // private members void moveSortOrderUp(); diff --git a/src/tag_editor.h b/src/tag_editor.h index ba368c5f..b286a20f 100644 --- a/src/tag_editor.h +++ b/src/tag_editor.h @@ -39,56 +39,56 @@ struct TagsWindow: NC::Menu, SongList TagsWindow(NC::Menu &&base) : NC::Menu(std::move(base)) { } - virtual SongIterator currentS() OVERRIDE; - virtual ConstSongIterator currentS() const OVERRIDE; - virtual SongIterator beginS() OVERRIDE; - virtual ConstSongIterator beginS() const OVERRIDE; - virtual SongIterator endS() OVERRIDE; - virtual ConstSongIterator endS() const OVERRIDE; - - virtual std::vector getSelectedSongs() OVERRIDE; + virtual SongIterator currentS() override; + virtual ConstSongIterator currentS() const override; + virtual SongIterator beginS() override; + virtual ConstSongIterator beginS() const override; + virtual SongIterator endS() override; + virtual ConstSongIterator endS() const override; + + virtual std::vector getSelectedSongs() override; }; struct TagEditor: Screen, HasActions, HasColumns, HasSongs, Searchable, Tabbable { TagEditor(); - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::TagEditor; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::TagEditor; } - virtual void refresh() OVERRIDE; - virtual void update() OVERRIDE; + virtual void refresh() override; + virtual void update() override; - virtual void mouseButtonPressed(MEVENT) OVERRIDE; + virtual void mouseButtonPressed(MEVENT) override; - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // Searchable implementation - virtual bool allowsSearching() OVERRIDE; - virtual const std::string &searchConstraint() OVERRIDE; - virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; - virtual void clearSearchConstraint() OVERRIDE; - virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; + virtual bool allowsSearching() override; + virtual const std::string &searchConstraint() override; + virtual void setSearchConstraint(const std::string &constraint) override; + virtual void clearSearchConstraint() override; + virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override; // HasActions implementation - virtual bool actionRunnable() OVERRIDE; - virtual void runAction() OVERRIDE; + virtual bool actionRunnable() override; + virtual void runAction() override; // HasSongs implementation - virtual bool itemAvailable() OVERRIDE; - virtual bool addItemToPlaylist(bool play) OVERRIDE; - virtual std::vector getSelectedSongs() OVERRIDE; + virtual bool itemAvailable() override; + virtual bool addItemToPlaylist(bool play) override; + virtual std::vector getSelectedSongs() override; // HasColumns implementation - virtual bool previousColumnAvailable() OVERRIDE; - virtual void previousColumn() OVERRIDE; + virtual bool previousColumnAvailable() override; + virtual void previousColumn() override; - virtual bool nextColumnAvailable() OVERRIDE; - virtual void nextColumn() OVERRIDE; + virtual bool nextColumnAvailable() override; + virtual void nextColumn() override; // private members bool enterDirectory(); diff --git a/src/tiny_tag_editor.h b/src/tiny_tag_editor.h index afed4586..6686f30f 100644 --- a/src/tiny_tag_editor.h +++ b/src/tiny_tag_editor.h @@ -34,22 +34,22 @@ struct TinyTagEditor: Screen>, HasActions TinyTagEditor(); // Screen< NC::Menu > implementation - virtual void resize() OVERRIDE; - virtual void switchTo() OVERRIDE; + virtual void resize() override; + virtual void switchTo() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::TinyTagEditor; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::TinyTagEditor; } - virtual void update() OVERRIDE { } + virtual void update() override { } - virtual void mouseButtonPressed(MEVENT me) OVERRIDE; + virtual void mouseButtonPressed(MEVENT me) override; - virtual bool isLockable() OVERRIDE { return false; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return false; } + virtual bool isMergable() override { return true; } // HasActions implementation - virtual bool actionRunnable() OVERRIDE; - virtual void runAction() OVERRIDE; + virtual bool actionRunnable() override; + virtual void runAction() override; // private members void SetEdited(const MPD::Song &); diff --git a/src/utility/conversion.h b/src/utility/conversion.h index 0d417443..7f33255d 100644 --- a/src/utility/conversion.h +++ b/src/utility/conversion.h @@ -64,7 +64,7 @@ struct OutOfBounds : std::exception "value is out of bounds ((<-, %1%] expected, %2% given)") % ubound % value).str()); } - virtual const char *what() const noexcept OVERRIDE { return m_error_message.c_str(); } + virtual const char *what() const noexcept override { return m_error_message.c_str(); } private: OutOfBounds(std::string msg) : m_error_message(msg) { } diff --git a/src/visualizer.h b/src/visualizer.h index eb525b99..b398374d 100644 --- a/src/visualizer.h +++ b/src/visualizer.h @@ -38,21 +38,21 @@ struct Visualizer: Screen, Tabbable { Visualizer(); - virtual void switchTo() OVERRIDE; - virtual void resize() OVERRIDE; + virtual void switchTo() override; + virtual void resize() override; - virtual std::wstring title() OVERRIDE; - virtual ScreenType type() OVERRIDE { return ScreenType::Visualizer; } + virtual std::wstring title() override; + virtual ScreenType type() override { return ScreenType::Visualizer; } - virtual void update() OVERRIDE; - virtual void scroll(NC::Scroll) OVERRIDE { } + virtual void update() override; + virtual void scroll(NC::Scroll) override { } - virtual int windowTimeout() OVERRIDE; + virtual int windowTimeout() override; - virtual void mouseButtonPressed(MEVENT) OVERRIDE { } + virtual void mouseButtonPressed(MEVENT) override { } - virtual bool isLockable() OVERRIDE { return true; } - virtual bool isMergable() OVERRIDE { return true; } + virtual bool isLockable() override { return true; } + virtual bool isMergable() override { return true; } // private members void ToggleVisualizationType(); diff --git a/src/window.h b/src/window.h index 71ad227d..a747c146 100644 --- a/src/window.h +++ b/src/window.h @@ -137,7 +137,7 @@ struct PromptAborted : std::exception PromptAborted(ArgT &&prompt) : m_prompt(std::forward(prompt)) { } - virtual const char *what() const noexcept OVERRIDE { return m_prompt.c_str(); } + virtual const char *what() const noexcept override { return m_prompt.c_str(); } private: std::string m_prompt;