configure: require c++14 compatible compiler

This commit is contained in:
Andrzej Rybczak
2016-11-13 11:04:23 +01:00
parent 40163dedaa
commit 41317d31c8
29 changed files with 549 additions and 591 deletions

1
NEWS
View File

@@ -2,6 +2,7 @@ ncmpcpp-0.8 (????-??-??)
* Configuration variable 'execute_on_player_state_change' was added. * 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 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. * 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) ncmpcpp-0.7.7 (2016-10-31)
* Fixed compilation on 32bit platforms. * Fixed compilation on 32bit platforms.

View File

@@ -28,70 +28,27 @@ if test "$clock" = "yes"; then
fi fi
dnl ================================ dnl ================================
dnl = checking for -std=c++0x flag = dnl = checking for -std=c++14 flag =
dnl ================================ dnl ================================
AC_MSG_CHECKING([whether compiler supports -std=c++0x]) AC_MSG_CHECKING([whether compiler supports -std=c++14])
old_CXXFLAGS="$CXXFLAGS" old_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="-std=c++0x" CXXFLAGS="-std=c++14"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]])],
AC_MSG_RESULT([yes]) AC_MSG_RESULT([yes])
std_cpp0x="-std=c++0x", std_cpp14="-std=c++14",
AC_MSG_RESULT([no]) 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 ===================================================
dnl = checking for initializer lists support = dnl = checking for generic lambda expressions support =
dnl ========================================== dnl ===================================================
AC_MSG_CHECKING([whether compiler supports initializer lists]) AC_MSG_CHECKING([whether compiler supports generic lambda expressions])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <vector>], [[std::vector<int> test = { 1, 2, 3 }; test.push_back(4);]])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[auto f = [](auto n) { return n*n; }; f(7);]])],
AC_MSG_RESULT([yes]), AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no]) AC_MSG_RESULT([no])
AC_MSG_ERROR([[Your compiler doesn't seem to support initializer lists, please upgrade (GCC >= 4.6)]]) AC_MSG_ERROR([[Your compiler doesn't seem to support generic lambda expressions, please upgrade (GCC >= 5)]])
)
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 <functional>], [[int a = 5; std::function<int(int)> 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 <functional>], [[struct A { void foo() { } }; struct B : public A { void bar() { std::function<void()> 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], []),
) )
dnl ============================= dnl =============================

File diff suppressed because it is too large Load Diff

View File

@@ -33,14 +33,14 @@ struct BrowserWindow: NC::Menu<MPD::Item>, SongList
BrowserWindow(NC::Menu<MPD::Item> &&base) BrowserWindow(NC::Menu<MPD::Item> &&base)
: NC::Menu<MPD::Item>(std::move(base)) { } : NC::Menu<MPD::Item>(std::move(base)) { }
virtual SongIterator currentS() OVERRIDE; virtual SongIterator currentS() override;
virtual ConstSongIterator currentS() const OVERRIDE; virtual ConstSongIterator currentS() const override;
virtual SongIterator beginS() OVERRIDE; virtual SongIterator beginS() override;
virtual ConstSongIterator beginS() const OVERRIDE; virtual ConstSongIterator beginS() const override;
virtual SongIterator endS() OVERRIDE; virtual SongIterator endS() override;
virtual ConstSongIterator endS() const OVERRIDE; virtual ConstSongIterator endS() const override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
}; };
struct Browser: Screen<BrowserWindow>, Filterable, HasSongs, Searchable, Tabbable struct Browser: Screen<BrowserWindow>, Filterable, HasSongs, Searchable, Tabbable
@@ -48,35 +48,35 @@ struct Browser: Screen<BrowserWindow>, Filterable, HasSongs, Searchable, Tabbabl
Browser(); Browser();
// Screen<BrowserWindow> implementation // Screen<BrowserWindow> implementation
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Browser; } 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
// Filterable implemenetation // Filterable implemenetation
virtual bool allowsFiltering() OVERRIDE; virtual bool allowsFiltering() override;
virtual std::string currentFilter() OVERRIDE; virtual std::string currentFilter() override;
virtual void applyFilter(const std::string &filter) OVERRIDE; virtual void applyFilter(const std::string &filter) override;
// HasSongs implementation // HasSongs implementation
virtual bool itemAvailable() OVERRIDE; virtual bool itemAvailable() override;
virtual bool addItemToPlaylist(bool play) OVERRIDE; virtual bool addItemToPlaylist(bool play) override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
// private members // private members
void requestUpdate() { m_update_request = true; } void requestUpdate() { m_update_request = true; }

View File

@@ -33,19 +33,19 @@ struct Clock: Screen<NC::Window>, Tabbable
{ {
Clock(); Clock();
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Clock; } virtual ScreenType type() override { return ScreenType::Clock; }
virtual void update() OVERRIDE; virtual void update() override;
virtual void scroll(NC::Scroll) 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 isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
private: private:
NC::Window m_pane; NC::Window m_pane;

View File

@@ -29,16 +29,16 @@ struct Help: Screen<NC::Scrollpad>, Tabbable
{ {
Help(); Help();
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Help; } virtual ScreenType type() override { return ScreenType::Help; }
virtual void update() OVERRIDE { } virtual void update() override { }
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
}; };
extern Help *myHelp; extern Help *myHelp;

View File

@@ -37,16 +37,16 @@ struct Lastfm: Screen<NC::Scrollpad>, Tabbable
{ {
Lastfm(); Lastfm();
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Lastfm; } virtual ScreenType type() override { return ScreenType::Lastfm; }
virtual void update() OVERRIDE; virtual void update() override;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
template <typename ServiceT> template <typename ServiceT>
void queueJob(ServiceT *service) void queueJob(ServiceT *service)

View File

@@ -34,16 +34,16 @@ struct Lyrics: Screen<NC::Scrollpad>, Tabbable
Lyrics(); Lyrics();
// Screen<NC::Scrollpad> implementation // Screen<NC::Scrollpad> implementation
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Lyrics; } virtual ScreenType type() override { return ScreenType::Lyrics; }
virtual void update() OVERRIDE; virtual void update() override;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// private members // private members
bool SetSong(const MPD::Song &s); bool SetSong(const MPD::Song &s);

View File

@@ -48,14 +48,14 @@ protected:
struct LyricwikiFetcher : public LyricsFetcher struct LyricwikiFetcher : public LyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "lyricwiki.com"; } virtual const char *name() const override { return "lyricwiki.com"; }
virtual Result fetch(const std::string &artist, const std::string &title) OVERRIDE; virtual Result fetch(const std::string &artist, const std::string &title) override;
protected: 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 *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 "<url>(.*?)</url>"; } virtual const char *regex() const override { return "<url>(.*?)</url>"; }
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 struct MetrolyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "metrolyrics.com"; } virtual const char *name() const override { return "metrolyrics.com"; }
protected: protected:
virtual const char *regex() const OVERRIDE { return "<div class=\"lyrics-body\">(.*?)</div>"; } virtual const char *regex() const override { return "<div class=\"lyrics-body\">(.*?)</div>"; }
virtual bool isURLOk(const std::string &url) OVERRIDE; virtual bool isURLOk(const std::string &url) override;
}; };
struct LyricsmaniaFetcher : public GoogleLyricsFetcher struct LyricsmaniaFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "lyricsmania.com"; } virtual const char *name() const override { return "lyricsmania.com"; }
protected: protected:
virtual const char *regex() const OVERRIDE { return "<div class=\"lyrics-body\".*?</strong>(.*?)</div>"; } virtual const char *regex() const override { return "<div class=\"lyrics-body\".*?</strong>(.*?)</div>"; }
}; };
struct Sing365Fetcher : public GoogleLyricsFetcher struct Sing365Fetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "sing365.com"; } virtual const char *name() const override { return "sing365.com"; }
protected: protected:
virtual const char *regex() const OVERRIDE { return "<!-Lyrics Begin->(.*?)<!-Lyrics End->"; } virtual const char *regex() const override { return "<!-Lyrics Begin->(.*?)<!-Lyrics End->"; }
}; };
struct JustSomeLyricsFetcher : public GoogleLyricsFetcher struct JustSomeLyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "justsomelyrics.com"; } virtual const char *name() const override { return "justsomelyrics.com"; }
protected: protected:
virtual const char *regex() const OVERRIDE { return "<div class=\"content.*?</div>\\s*</div>(.*?)<div"; } virtual const char *regex() const override { return "<div class=\"content.*?</div>\\s*</div>(.*?)<div"; }
}; };
struct AzLyricsFetcher : public GoogleLyricsFetcher struct AzLyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "azlyrics.com"; } virtual const char *name() const override { return "azlyrics.com"; }
protected: protected:
virtual const char *regex() const OVERRIDE { return "<div class=\"lyricsh\">.*?</h2>.*<div>(.*?)</div>"; } virtual const char *regex() const override { return "<div class=\"lyricsh\">.*?</h2>.*<div>(.*?)</div>"; }
}; };
struct InternetLyricsFetcher : public GoogleLyricsFetcher struct InternetLyricsFetcher : public GoogleLyricsFetcher
{ {
virtual const char *name() const OVERRIDE { return "the Internet"; } virtual const char *name() const override { return "the Internet"; }
virtual Result fetch(const std::string &artist, const std::string &title) OVERRIDE; virtual Result fetch(const std::string &artist, const std::string &title) override;
protected: protected:
virtual const char *siteKeyword() const OVERRIDE { return "lyrics"; } virtual const char *siteKeyword() const override { return "lyrics"; }
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;
private: private:
std::string URL; std::string URL;

View File

@@ -32,7 +32,7 @@ struct PushCharacters: BaseAction
PushCharacters(NC::Window **w, std::vector<NC::Key::Type> &&queue); PushCharacters(NC::Window **w, std::vector<NC::Key::Type> &&queue);
private: private:
virtual void run() OVERRIDE; virtual void run() override;
NC::Window **m_window; NC::Window **m_window;
std::vector<NC::Key::Type> m_queue; std::vector<NC::Key::Type> m_queue;
@@ -43,8 +43,8 @@ struct RequireRunnable: BaseAction
RequireRunnable(BaseAction *action); RequireRunnable(BaseAction *action);
private: private:
virtual bool canBeRun() OVERRIDE; virtual bool canBeRun() override;
virtual void run() OVERRIDE { } virtual void run() override { }
BaseAction *m_action; BaseAction *m_action;
}; };
@@ -54,8 +54,8 @@ struct RequireScreen: BaseAction
RequireScreen(ScreenType screen_type); RequireScreen(ScreenType screen_type);
private: private:
virtual bool canBeRun() OVERRIDE; virtual bool canBeRun() override;
virtual void run() OVERRIDE { } virtual void run() override { }
ScreenType m_screen_type; ScreenType m_screen_type;
}; };
@@ -65,7 +65,7 @@ struct RunExternalCommand: BaseAction
RunExternalCommand(std::string command); RunExternalCommand(std::string command);
private: private:
virtual void run() OVERRIDE; virtual void run() override;
std::string m_command; std::string m_command;
}; };

View File

@@ -32,45 +32,45 @@ struct MediaLibrary: Screen<NC::Window *>, Filterable, HasColumns, HasSongs, Sea
{ {
MediaLibrary(); MediaLibrary();
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::MediaLibrary; } virtual ScreenType type() override { return ScreenType::MediaLibrary; }
virtual void refresh() OVERRIDE; virtual void refresh() override;
virtual void update() 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
// Filterable implementation // Filterable implementation
virtual bool allowsFiltering() OVERRIDE; virtual bool allowsFiltering() override;
virtual std::string currentFilter() OVERRIDE; virtual std::string currentFilter() override;
virtual void applyFilter(const std::string &filter) OVERRIDE; virtual void applyFilter(const std::string &filter) override;
// HasSongs implementation // HasSongs implementation
virtual bool itemAvailable() OVERRIDE; virtual bool itemAvailable() override;
virtual bool addItemToPlaylist(bool play) OVERRIDE; virtual bool addItemToPlaylist(bool play) override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
// HasColumns implementation // HasColumns implementation
virtual bool previousColumnAvailable() OVERRIDE; virtual bool previousColumnAvailable() override;
virtual void previousColumn() OVERRIDE; virtual void previousColumn() override;
virtual bool nextColumnAvailable() OVERRIDE; virtual bool nextColumnAvailable() override;
virtual void nextColumn() OVERRIDE; virtual void nextColumn() override;
// other members // other members
void updateTimer(); void updateTimer();

View File

@@ -314,30 +314,30 @@ struct Menu: Window, List
/// Checks if list is empty /// Checks if list is empty
/// @return true if list is empty, false otherwise /// @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 /// @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 /// @return currently highlighted position
virtual size_t choice() const OVERRIDE; virtual size_t choice() const override;
/// Highlights given position /// Highlights given position
/// @param pos position to be highlighted /// @param pos position to be highlighted
virtual void highlight(size_t position) OVERRIDE; virtual void highlight(size_t position) override;
/// Refreshes the menu window /// Refreshes the menu window
/// @see Window::refresh() /// @see Window::refresh()
virtual void refresh() OVERRIDE; virtual void refresh() override;
/// Scrolls by given amount of lines /// Scrolls by given amount of lines
/// @param where indicated where exactly one wants to go /// @param where indicated where exactly one wants to go
/// @see Window::scroll() /// @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. /// Cleares all options, used filters etc. It doesn't reset highlighted position though.
/// @see reset() /// @see reset()
virtual void clear() OVERRIDE; virtual void clear() override;
/// Sets highlighted position to 0 /// Sets highlighted position to 0
void reset(); void reset();
@@ -468,22 +468,22 @@ struct Menu: Window, List
ReverseValueIterator rendV() { return ReverseValueIterator(beginV()); } ReverseValueIterator rendV() { return ReverseValueIterator(beginV()); }
ConstReverseValueIterator rendV() const { return ConstReverseValueIterator(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)); 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)); 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())); 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())); return List::ConstIterator(ConstPropertiesIterator(m_items->begin()));
} }
virtual List::Iterator endP() OVERRIDE { virtual List::Iterator endP() override {
return List::Iterator(PropertiesIterator(m_items->end())); 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())); return List::ConstIterator(ConstPropertiesIterator(m_items->end()));
} }

View File

@@ -34,17 +34,17 @@ struct MutableSong : public Song
MutableSong() : m_mtime(0), m_duration(0) { } MutableSong() : m_mtime(0), m_duration(0) { }
MutableSong(Song s) : Song(s), 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 getArtist(unsigned idx = 0) const override;
virtual std::string getTitle(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 getAlbum(unsigned idx = 0) const override;
virtual std::string getAlbumArtist(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 getTrack(unsigned idx = 0) const override;
virtual std::string getDate(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 getGenre(unsigned idx = 0) const override;
virtual std::string getComposer(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 getPerformer(unsigned idx = 0) const override;
virtual std::string getDisc(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 getComment(unsigned idx = 0) const override;
void setArtist(const std::string &value, unsigned idx = 0); void setArtist(const std::string &value, unsigned idx = 0);
void setTitle(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; const std::string &getNewName() const;
void setNewName(const std::string &value); void setNewName(const std::string &value);
virtual unsigned getDuration() const OVERRIDE; virtual unsigned getDuration() const override;
virtual time_t getMTime() const OVERRIDE; virtual time_t getMTime() const override;
void setDuration(unsigned duration); void setDuration(unsigned duration);
void setMTime(time_t mtime); void setMTime(time_t mtime);

View File

@@ -35,18 +35,18 @@ struct Outputs: Screen<NC::Menu<MPD::Output>>, Tabbable
Outputs(); Outputs();
// Screen< NC::Menu<MPD::Output> > implementation // Screen< NC::Menu<MPD::Output> > implementation
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Outputs; } 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// private members // private members
void fetchList(); void fetchList();

View File

@@ -35,35 +35,35 @@ struct Playlist: Screen<SongMenu>, Filterable, HasSongs, Searchable, Tabbable
Playlist(); Playlist();
// Screen<SongMenu> implementation // Screen<SongMenu> implementation
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Playlist; } 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
// Filterable implementation // Filterable implementation
virtual bool allowsFiltering() OVERRIDE; virtual bool allowsFiltering() override;
virtual std::string currentFilter() OVERRIDE; virtual std::string currentFilter() override;
virtual void applyFilter(const std::string &filter) OVERRIDE; virtual void applyFilter(const std::string &filter) override;
// HasSongs implementation // HasSongs implementation
virtual bool itemAvailable() OVERRIDE; virtual bool itemAvailable() override;
virtual bool addItemToPlaylist(bool play) OVERRIDE; virtual bool addItemToPlaylist(bool play) override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
// other members // other members
MPD::Song nowPlayingSong(); MPD::Song nowPlayingSong();

View File

@@ -32,45 +32,45 @@ struct PlaylistEditor: Screen<NC::Window *>, Filterable, HasColumns, HasSongs, S
{ {
PlaylistEditor(); PlaylistEditor();
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::PlaylistEditor; } virtual ScreenType type() override { return ScreenType::PlaylistEditor; }
virtual void refresh() OVERRIDE; virtual void refresh() override;
virtual void update() 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
// Filterable implementation // Filterable implementation
virtual bool allowsFiltering() OVERRIDE; virtual bool allowsFiltering() override;
virtual std::string currentFilter() OVERRIDE; virtual std::string currentFilter() override;
virtual void applyFilter(const std::string &filter) OVERRIDE; virtual void applyFilter(const std::string &filter) override;
// HasSongs implementation // HasSongs implementation
virtual bool itemAvailable() OVERRIDE; virtual bool itemAvailable() override;
virtual bool addItemToPlaylist(bool play) OVERRIDE; virtual bool addItemToPlaylist(bool play) override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
// HasColumns implementation // HasColumns implementation
virtual bool previousColumnAvailable() OVERRIDE; virtual bool previousColumnAvailable() override;
virtual void previousColumn() OVERRIDE; virtual void previousColumn() override;
virtual bool nextColumnAvailable() OVERRIDE; virtual bool nextColumnAvailable() override;
virtual void nextColumn() OVERRIDE; virtual void nextColumn() override;
// private members // private members
void updateTimer(); void updateTimer();

View File

@@ -152,7 +152,7 @@ public:
virtual ~Screen() { } 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_; return &Accessor::constApply(w) == &w_;
} }
@@ -160,20 +160,20 @@ public:
/// it's useful to determine the one that is being /// it's useful to determine the one that is being
/// active /// active
/// @return address to window object cast to void * /// @return address to window object cast to void *
virtual NC::Window *activeWindow() OVERRIDE { virtual NC::Window *activeWindow() override {
return &Accessor::apply(w); return &Accessor::apply(w);
} }
virtual const NC::Window *activeWindow() const OVERRIDE { virtual const NC::Window *activeWindow() const override {
return &Accessor::constApply(w); return &Accessor::constApply(w);
} }
/// Refreshes whole screen /// Refreshes whole screen
virtual void refresh() OVERRIDE { virtual void refresh() override {
Accessor::apply(w).display(); Accessor::apply(w).display();
} }
/// Refreshes active window of the screen /// Refreshes active window of the screen
virtual void refreshWindow() OVERRIDE { virtual void refreshWindow() override {
Accessor::apply(w).display(); Accessor::apply(w).display();
} }
@@ -181,20 +181,20 @@ public:
/// if fancy scrolling feature is disabled, enters the /// if fancy scrolling feature is disabled, enters the
/// loop that holds main loop until user releases the key /// loop that holds main loop until user releases the key
/// @param where indicates where one wants to scroll /// @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); Accessor::apply(w).scroll(where);
} }
/// @return timeout parameter used for the screen (in ms) /// @return timeout parameter used for the screen (in ms)
/// @default defaultWindowTimeout /// @default defaultWindowTimeout
virtual int windowTimeout() OVERRIDE { virtual int windowTimeout() override {
return defaultWindowTimeout; return defaultWindowTimeout;
} }
/// Invoked after there was one of mouse buttons pressed /// Invoked after there was one of mouse buttons pressed
/// @param me struct that contains coords of where the click /// @param me struct that contains coords of where the click
/// had its place and button actions /// had its place and button actions
virtual void mouseButtonPressed(MEVENT me) OVERRIDE { virtual void mouseButtonPressed(MEVENT me) override {
genericMouseButtonPressed(Accessor::apply(w), me); genericMouseButtonPressed(Accessor::apply(w), me);
} }

View File

@@ -36,10 +36,10 @@ struct Scrollpad: public Window
const std::string &title, Color color, Border border); const std::string &title, Color color, Border border);
// override a few Window functions // override a few Window functions
virtual void refresh() OVERRIDE; virtual void refresh() override;
virtual void scroll(Scroll where) OVERRIDE; virtual void scroll(Scroll where) override;
virtual void resize(size_t new_width, size_t new_height) OVERRIDE; virtual void resize(size_t new_width, size_t new_height) override;
virtual void clear() OVERRIDE; virtual void clear() override;
const std::string &buffer(); const std::string &buffer();

View File

@@ -81,14 +81,14 @@ struct SearchEngineWindow: NC::Menu<SEItem>, SongList
SearchEngineWindow(NC::Menu<SEItem> &&base) SearchEngineWindow(NC::Menu<SEItem> &&base)
: NC::Menu<SEItem>(std::move(base)) { } : NC::Menu<SEItem>(std::move(base)) { }
virtual SongIterator currentS() OVERRIDE; virtual SongIterator currentS() override;
virtual ConstSongIterator currentS() const OVERRIDE; virtual ConstSongIterator currentS() const override;
virtual SongIterator beginS() OVERRIDE; virtual SongIterator beginS() override;
virtual ConstSongIterator beginS() const OVERRIDE; virtual ConstSongIterator beginS() const override;
virtual SongIterator endS() OVERRIDE; virtual SongIterator endS() override;
virtual ConstSongIterator endS() const OVERRIDE; virtual ConstSongIterator endS() const override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
}; };
struct SearchEngine: Screen<SearchEngineWindow>, Filterable, HasActions, HasSongs, Searchable, Tabbable struct SearchEngine: Screen<SearchEngineWindow>, Filterable, HasActions, HasSongs, Searchable, Tabbable
@@ -96,39 +96,39 @@ struct SearchEngine: Screen<SearchEngineWindow>, Filterable, HasActions, HasSong
SearchEngine(); SearchEngine();
// Screen<SearchEngineWindow> implementation // Screen<SearchEngineWindow> implementation
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::SearchEngine; } 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
// Filterable implementation // Filterable implementation
virtual bool allowsFiltering() OVERRIDE; virtual bool allowsFiltering() override;
virtual std::string currentFilter() OVERRIDE; virtual std::string currentFilter() override;
virtual void applyFilter(const std::string &filter) OVERRIDE; virtual void applyFilter(const std::string &filter) override;
// HasActions implementation // HasActions implementation
virtual bool actionRunnable() OVERRIDE; virtual bool actionRunnable() override;
virtual void runAction() OVERRIDE; virtual void runAction() override;
// HasSongs implementation // HasSongs implementation
virtual bool itemAvailable() OVERRIDE; virtual bool itemAvailable() override;
virtual bool addItemToPlaylist(bool play) OVERRIDE; virtual bool addItemToPlaylist(bool play) override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
// private members // private members
void reset(); void reset();

View File

@@ -35,30 +35,30 @@ struct SelectedItemsAdder: Screen<NC::Menu<RunnableItem<std::string, void()>> *>
SelectedItemsAdder(); SelectedItemsAdder();
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void refresh() OVERRIDE; virtual void refresh() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::SelectedItemsAdder; } 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 isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return false; } virtual bool isMergable() override { return false; }
// HasActions implementation // HasActions implementation
virtual bool actionRunnable() OVERRIDE; virtual bool actionRunnable() override;
virtual void runAction() OVERRIDE; virtual void runAction() override;
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
private: private:
void populatePlaylistSelector(BaseScreen *screen); void populatePlaylistSelector(BaseScreen *screen);

View File

@@ -31,16 +31,16 @@ struct ServerInfo: Screen<NC::Scrollpad>, Tabbable
ServerInfo(); ServerInfo();
// Screen<NC::Scrollpad> implementation // Screen<NC::Scrollpad> implementation
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::ServerInfo; } virtual ScreenType type() override { return ScreenType::ServerInfo; }
virtual void update() OVERRIDE; virtual void update() override;
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return false; } virtual bool isMergable() override { return false; }
private: private:
void SetDimensions(); void SetDimensions();

View File

@@ -37,16 +37,16 @@ struct SongInfo: Screen<NC::Scrollpad>, Tabbable
SongInfo(); SongInfo();
// Screen<NC::Scrollpad> implementation // Screen<NC::Scrollpad> implementation
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::SongInfo; } virtual ScreenType type() override { return ScreenType::SongInfo; }
virtual void update() OVERRIDE { } virtual void update() override { }
virtual bool isLockable() OVERRIDE { return false; } virtual bool isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// private members // private members
static const Metadata Tags[]; static const Metadata Tags[];

View File

@@ -65,14 +65,14 @@ struct SongMenu: NC::Menu<MPD::Song>, SongList
SongMenu(NC::Menu<MPD::Song> &&base) SongMenu(NC::Menu<MPD::Song> &&base)
: NC::Menu<MPD::Song>(std::move(base)) { } : NC::Menu<MPD::Song>(std::move(base)) { }
virtual SongIterator currentS() OVERRIDE; virtual SongIterator currentS() override;
virtual ConstSongIterator currentS() const OVERRIDE; virtual ConstSongIterator currentS() const override;
virtual SongIterator beginS() OVERRIDE; virtual SongIterator beginS() override;
virtual ConstSongIterator beginS() const OVERRIDE; virtual ConstSongIterator beginS() const override;
virtual SongIterator endS() OVERRIDE; virtual SongIterator endS() override;
virtual ConstSongIterator endS() const OVERRIDE; virtual ConstSongIterator endS() const override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
}; };
#endif // NCMPCPP_SONG_LIST_H #endif // NCMPCPP_SONG_LIST_H

View File

@@ -33,22 +33,22 @@ struct SortPlaylistDialog
SortPlaylistDialog(); SortPlaylistDialog();
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::SortPlaylistDialog; } 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 isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return false; } virtual bool isMergable() override { return false; }
// HasActions implementation // HasActions implementation
virtual bool actionRunnable() OVERRIDE; virtual bool actionRunnable() override;
virtual void runAction() OVERRIDE; virtual void runAction() override;
// private members // private members
void moveSortOrderUp(); void moveSortOrderUp();

View File

@@ -39,56 +39,56 @@ struct TagsWindow: NC::Menu<MPD::MutableSong>, SongList
TagsWindow(NC::Menu<MPD::MutableSong> &&base) TagsWindow(NC::Menu<MPD::MutableSong> &&base)
: NC::Menu<MPD::MutableSong>(std::move(base)) { } : NC::Menu<MPD::MutableSong>(std::move(base)) { }
virtual SongIterator currentS() OVERRIDE; virtual SongIterator currentS() override;
virtual ConstSongIterator currentS() const OVERRIDE; virtual ConstSongIterator currentS() const override;
virtual SongIterator beginS() OVERRIDE; virtual SongIterator beginS() override;
virtual ConstSongIterator beginS() const OVERRIDE; virtual ConstSongIterator beginS() const override;
virtual SongIterator endS() OVERRIDE; virtual SongIterator endS() override;
virtual ConstSongIterator endS() const OVERRIDE; virtual ConstSongIterator endS() const override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
}; };
struct TagEditor: Screen<NC::Window *>, HasActions, HasColumns, HasSongs, Searchable, Tabbable struct TagEditor: Screen<NC::Window *>, HasActions, HasColumns, HasSongs, Searchable, Tabbable
{ {
TagEditor(); TagEditor();
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::TagEditor; } virtual ScreenType type() override { return ScreenType::TagEditor; }
virtual void refresh() OVERRIDE; virtual void refresh() override;
virtual void update() OVERRIDE; virtual void update() override;
virtual void mouseButtonPressed(MEVENT) OVERRIDE; virtual void mouseButtonPressed(MEVENT) override;
virtual bool isLockable() OVERRIDE { return true; } virtual bool isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// Searchable implementation // Searchable implementation
virtual bool allowsSearching() OVERRIDE; virtual bool allowsSearching() override;
virtual const std::string &searchConstraint() OVERRIDE; virtual const std::string &searchConstraint() override;
virtual void setSearchConstraint(const std::string &constraint) OVERRIDE; virtual void setSearchConstraint(const std::string &constraint) override;
virtual void clearSearchConstraint() OVERRIDE; virtual void clearSearchConstraint() override;
virtual bool search(SearchDirection direction, bool wrap, bool skip_current) OVERRIDE; virtual bool search(SearchDirection direction, bool wrap, bool skip_current) override;
// HasActions implementation // HasActions implementation
virtual bool actionRunnable() OVERRIDE; virtual bool actionRunnable() override;
virtual void runAction() OVERRIDE; virtual void runAction() override;
// HasSongs implementation // HasSongs implementation
virtual bool itemAvailable() OVERRIDE; virtual bool itemAvailable() override;
virtual bool addItemToPlaylist(bool play) OVERRIDE; virtual bool addItemToPlaylist(bool play) override;
virtual std::vector<MPD::Song> getSelectedSongs() OVERRIDE; virtual std::vector<MPD::Song> getSelectedSongs() override;
// HasColumns implementation // HasColumns implementation
virtual bool previousColumnAvailable() OVERRIDE; virtual bool previousColumnAvailable() override;
virtual void previousColumn() OVERRIDE; virtual void previousColumn() override;
virtual bool nextColumnAvailable() OVERRIDE; virtual bool nextColumnAvailable() override;
virtual void nextColumn() OVERRIDE; virtual void nextColumn() override;
// private members // private members
bool enterDirectory(); bool enterDirectory();

View File

@@ -34,22 +34,22 @@ struct TinyTagEditor: Screen<NC::Menu<NC::Buffer>>, HasActions
TinyTagEditor(); TinyTagEditor();
// Screen< NC::Menu<NC::Buffer> > implementation // Screen< NC::Menu<NC::Buffer> > implementation
virtual void resize() OVERRIDE; virtual void resize() override;
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::TinyTagEditor; } 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 isLockable() override { return false; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// HasActions implementation // HasActions implementation
virtual bool actionRunnable() OVERRIDE; virtual bool actionRunnable() override;
virtual void runAction() OVERRIDE; virtual void runAction() override;
// private members // private members
void SetEdited(const MPD::Song &); void SetEdited(const MPD::Song &);

View File

@@ -64,7 +64,7 @@ struct OutOfBounds : std::exception
"value is out of bounds ((<-, %1%] expected, %2% given)") % ubound % value).str()); "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: private:
OutOfBounds(std::string msg) : m_error_message(msg) { } OutOfBounds(std::string msg) : m_error_message(msg) { }

View File

@@ -38,21 +38,21 @@ struct Visualizer: Screen<NC::Window>, Tabbable
{ {
Visualizer(); Visualizer();
virtual void switchTo() OVERRIDE; virtual void switchTo() override;
virtual void resize() OVERRIDE; virtual void resize() override;
virtual std::wstring title() OVERRIDE; virtual std::wstring title() override;
virtual ScreenType type() OVERRIDE { return ScreenType::Visualizer; } virtual ScreenType type() override { return ScreenType::Visualizer; }
virtual void update() OVERRIDE; virtual void update() override;
virtual void scroll(NC::Scroll) 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 isLockable() override { return true; }
virtual bool isMergable() OVERRIDE { return true; } virtual bool isMergable() override { return true; }
// private members // private members
void ToggleVisualizationType(); void ToggleVisualizationType();

View File

@@ -137,7 +137,7 @@ struct PromptAborted : std::exception
PromptAborted(ArgT &&prompt) PromptAborted(ArgT &&prompt)
: m_prompt(std::forward<ArgT>(prompt)) { } : m_prompt(std::forward<ArgT>(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: private:
std::string m_prompt; std::string m_prompt;