1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-16 11:19:18 +01:00

Add OVERRIDE macro like Java's @Override.

This commit is contained in:
John Maguire 2012-06-20 16:49:41 +02:00
parent 0827865804
commit 09d37aaa01
2 changed files with 24 additions and 1 deletions

View File

@ -0,0 +1,22 @@
#ifndef OVERRIDE_H
#define OVERRIDE_H
// Defines the OVERRIDE macro as C++11's override control keyword if
// it is available.
#ifndef __has_extension
#define __has_extension(x) 0
#endif
#if __has_extension(cxx_override_control) // Clang feature checking macro.
# define OVERRIDE override
#elif defined(__GNUC__) // Clang also defines this.
# include <features.h>
# if __GNUC_PREREQ(4,7)
# define OVERRIDE override
# else
# define OVERRIDE
# endif
#endif
#endif // OVERRIDE_H

View File

@ -21,6 +21,7 @@
#include "songinfoprovider.h"
#include "core/network.h"
#include "core/override.h"
#include "internet/geolocator.h"
class QNetworkReply;
@ -31,7 +32,7 @@ class SongkickConcerts : public SongInfoProvider {
public:
SongkickConcerts();
void FetchInfo(int id, const Song& metadata);
void FetchInfo(int id, const Song& metadata) OVERRIDE;
private slots:
void ArtistSearchFinished(QNetworkReply* reply, int id);