summaryrefslogtreecommitdiff
path: root/src/music
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-03-03 22:25:13 +0000
committerMichael Lutz <michi@icosahedron.de>2019-03-24 16:10:04 +0100
commitaf7d9020a15c1b1a14b3981ac73c70d2e58cc877 (patch)
tree1dcff3e01382ea3a0a4733a4637659dbbfd4bad5 /src/music
parent31260e66252fb4d0dda6f992520faeeb96929cfe (diff)
downloadopenttd-af7d9020a15c1b1a14b3981ac73c70d2e58cc877.tar.xz
Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual member declaration overrides a base-class member with the same signature. Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked as virtual despite being a template.
Diffstat (limited to 'src/music')
-rw-r--r--src/music/allegro_m.h16
-rw-r--r--src/music/bemidi.h16
-rw-r--r--src/music/cocoa_m.h16
-rw-r--r--src/music/dmusic.h16
-rw-r--r--src/music/extmidi.h16
-rw-r--r--src/music/fluidsynth.h16
-rw-r--r--src/music/null_m.h16
-rw-r--r--src/music/os2_m.h16
-rw-r--r--src/music/qtmidi.h16
-rw-r--r--src/music/win32_m.h16
10 files changed, 80 insertions, 80 deletions
diff --git a/src/music/allegro_m.h b/src/music/allegro_m.h
index 65d8ab811..9451162a2 100644
--- a/src/music/allegro_m.h
+++ b/src/music/allegro_m.h
@@ -17,18 +17,18 @@
/** Allegro's music player. */
class MusicDriver_Allegro : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "allegro"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "allegro"; }
};
/** Factory for allegro's music player. */
@@ -43,7 +43,7 @@ public:
static const int PRIORITY = 2;
#endif
FMusicDriver_Allegro() : DriverFactoryBase(Driver::DT_MUSIC, PRIORITY, "allegro", "Allegro MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_Allegro(); }
+ Driver *CreateInstance() const override { return new MusicDriver_Allegro(); }
};
#endif /* MUSIC_ALLEGRO_H */
diff --git a/src/music/bemidi.h b/src/music/bemidi.h
index 7c546525d..8591ec015 100644
--- a/src/music/bemidi.h
+++ b/src/music/bemidi.h
@@ -17,25 +17,25 @@
/** The midi player for BeOS. */
class MusicDriver_BeMidi : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "bemidi"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "bemidi"; }
};
/** Factory for the BeOS midi player. */
class FMusicDriver_BeMidi : public DriverFactoryBase {
public:
FMusicDriver_BeMidi() : DriverFactoryBase(Driver::DT_MUSIC, 10, "bemidi", "BeOS MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_BeMidi(); }
+ Driver *CreateInstance() const override { return new MusicDriver_BeMidi(); }
};
#endif /* MUSIC_BEMIDI_H */
diff --git a/src/music/cocoa_m.h b/src/music/cocoa_m.h
index fdb10b84e..769492799 100644
--- a/src/music/cocoa_m.h
+++ b/src/music/cocoa_m.h
@@ -16,24 +16,24 @@
class MusicDriver_Cocoa : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "cocoa"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "cocoa"; }
};
class FMusicDriver_Cocoa : public DriverFactoryBase {
public:
FMusicDriver_Cocoa() : DriverFactoryBase(Driver::DT_MUSIC, 10, "cocoa", "Cocoa MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_Cocoa(); }
+ Driver *CreateInstance() const override { return new MusicDriver_Cocoa(); }
};
#endif /* MUSIC_MACOSX_COCOA_H */
diff --git a/src/music/dmusic.h b/src/music/dmusic.h
index 527e064e4..5b363b891 100644
--- a/src/music/dmusic.h
+++ b/src/music/dmusic.h
@@ -19,25 +19,25 @@ class MusicDriver_DMusic : public MusicDriver {
public:
virtual ~MusicDriver_DMusic();
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "dmusic"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "dmusic"; }
};
/** Factory for the DirectX music player. */
class FMusicDriver_DMusic : public DriverFactoryBase {
public:
FMusicDriver_DMusic() : DriverFactoryBase(Driver::DT_MUSIC, 10, "dmusic", "DirectMusic MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_DMusic(); }
+ Driver *CreateInstance() const override { return new MusicDriver_DMusic(); }
};
#endif /* MUSIC_DMUSIC_H */
diff --git a/src/music/extmidi.h b/src/music/extmidi.h
index e174dc9b0..55050c0d2 100644
--- a/src/music/extmidi.h
+++ b/src/music/extmidi.h
@@ -24,24 +24,24 @@ private:
void DoStop();
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "extmidi"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "extmidi"; }
};
class FMusicDriver_ExtMidi : public DriverFactoryBase {
public:
FMusicDriver_ExtMidi() : DriverFactoryBase(Driver::DT_MUSIC, 3, "extmidi", "External MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_ExtMidi(); }
+ Driver *CreateInstance() const override { return new MusicDriver_ExtMidi(); }
};
#endif /* MUSIC_EXTERNAL_H */
diff --git a/src/music/fluidsynth.h b/src/music/fluidsynth.h
index 171128a8e..e8a294b77 100644
--- a/src/music/fluidsynth.h
+++ b/src/music/fluidsynth.h
@@ -17,25 +17,25 @@
/** Music driver making use of FluidSynth. */
class MusicDriver_FluidSynth : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "fluidsynth"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "fluidsynth"; }
};
/** Factory for the fluidsynth driver. */
class FMusicDriver_FluidSynth : public DriverFactoryBase {
public:
FMusicDriver_FluidSynth() : DriverFactoryBase(Driver::DT_MUSIC, 5, "fluidsynth", "FluidSynth MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_FluidSynth(); }
+ Driver *CreateInstance() const override { return new MusicDriver_FluidSynth(); }
};
#endif /* MUSIC_FLUIDSYNTH_H */
diff --git a/src/music/null_m.h b/src/music/null_m.h
index 51e1a0665..837eeb092 100644
--- a/src/music/null_m.h
+++ b/src/music/null_m.h
@@ -17,25 +17,25 @@
/** The music player that does nothing. */
class MusicDriver_Null : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param) { return NULL; }
+ const char *Start(const char * const *param) override { return NULL; }
- /* virtual */ void Stop() { }
+ void Stop() override { }
- /* virtual */ void PlaySong(const MusicSongInfo &song) { }
+ void PlaySong(const MusicSongInfo &song) override { }
- /* virtual */ void StopSong() { }
+ void StopSong() override { }
- /* virtual */ bool IsSongPlaying() { return true; }
+ bool IsSongPlaying() override { return true; }
- /* virtual */ void SetVolume(byte vol) { }
- /* virtual */ const char *GetName() const { return "null"; }
+ void SetVolume(byte vol) override { }
+ const char *GetName() const override { return "null"; }
};
/** Factory for the null music player. */
class FMusicDriver_Null : public DriverFactoryBase {
public:
FMusicDriver_Null() : DriverFactoryBase(Driver::DT_MUSIC, 1, "null", "Null Music Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_Null(); }
+ Driver *CreateInstance() const override { return new MusicDriver_Null(); }
};
#endif /* MUSIC_NULL_H */
diff --git a/src/music/os2_m.h b/src/music/os2_m.h
index ac7cd0319..e320946ed 100644
--- a/src/music/os2_m.h
+++ b/src/music/os2_m.h
@@ -17,25 +17,25 @@
/** OS/2's music player. */
class MusicDriver_OS2 : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "os2"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "os2"; }
};
/** Factory for OS/2's music player. */
class FMusicDriver_OS2 : public DriverFactoryBase {
public:
FMusicDriver_OS2() : DriverFactoryBase(Driver::DT_MUSIC, 10, "os2", "OS/2 Music Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_OS2(); }
+ Driver *CreateInstance() const override { return new MusicDriver_OS2(); }
};
#endif /* MUSIC_OS2_H */
diff --git a/src/music/qtmidi.h b/src/music/qtmidi.h
index 32163db93..631f04d2d 100644
--- a/src/music/qtmidi.h
+++ b/src/music/qtmidi.h
@@ -16,24 +16,24 @@
class MusicDriver_QtMidi : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "qt"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "qt"; }
};
class FMusicDriver_QtMidi : public DriverFactoryBase {
public:
FMusicDriver_QtMidi() : DriverFactoryBase(Driver::DT_MUSIC, 5, "qt", "QuickTime MIDI Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_QtMidi(); }
+ Driver *CreateInstance() const override { return new MusicDriver_QtMidi(); }
};
#endif /* MUSIC_MACOSX_QUICKTIME_H */
diff --git a/src/music/win32_m.h b/src/music/win32_m.h
index 1ac8ae69e..5366cf5d7 100644
--- a/src/music/win32_m.h
+++ b/src/music/win32_m.h
@@ -17,25 +17,25 @@
/** The Windows music player. */
class MusicDriver_Win32 : public MusicDriver {
public:
- /* virtual */ const char *Start(const char * const *param);
+ const char *Start(const char * const *param) override;
- /* virtual */ void Stop();
+ void Stop() override;
- /* virtual */ void PlaySong(const MusicSongInfo &song);
+ void PlaySong(const MusicSongInfo &song) override;
- /* virtual */ void StopSong();
+ void StopSong() override;
- /* virtual */ bool IsSongPlaying();
+ bool IsSongPlaying() override;
- /* virtual */ void SetVolume(byte vol);
- /* virtual */ const char *GetName() const { return "win32"; }
+ void SetVolume(byte vol) override;
+ const char *GetName() const override { return "win32"; }
};
/** Factory for Windows' music player. */
class FMusicDriver_Win32 : public DriverFactoryBase {
public:
FMusicDriver_Win32() : DriverFactoryBase(Driver::DT_MUSIC, 5, "win32", "Win32 Music Driver") {}
- /* virtual */ Driver *CreateInstance() const { return new MusicDriver_Win32(); }
+ Driver *CreateInstance() const override { return new MusicDriver_Win32(); }
};
#endif /* MUSIC_WIN32_H */