Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[modernize] use-equals-default #16669

Merged
merged 1 commit into from Sep 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion tools/EventClients/Clients/OSXRemote/xbmcclientwrapper.mm
Expand Up @@ -30,7 +30,7 @@
//helper class for easy EventSequence handling
class XBMCClientEventSequence{
public:
XBMCClientEventSequence(){}
XBMCClientEventSequence() = default;

//implicit conversion
XBMCClientEventSequence(eATVClientEvent f_event){
Expand Down
22 changes: 8 additions & 14 deletions tools/EventClients/lib/c++/xbmcclient.h
Expand Up @@ -140,8 +140,8 @@ class CAddress
class XBMCClientUtils
{
public:
XBMCClientUtils() {}
~XBMCClientUtils() {}
XBMCClientUtils() = default;
~XBMCClientUtils() = default;
static unsigned int GetUniqueIdentifier()
{
static time_t id = time(NULL);
Expand Down Expand Up @@ -196,8 +196,7 @@ class CPacket
{
m_PacketType = 0;
}
virtual ~CPacket()
{ }
virtual ~CPacket() = default;

bool Send(int Socket, CAddress &Addr, unsigned int UID = XBMCClientUtils::GetUniqueIdentifier())
{
Expand Down Expand Up @@ -595,8 +594,7 @@ class CPacketPING : public CPacket
{
m_PacketType = PT_PING;
}
virtual ~CPacketPING()
{ }
virtual ~CPacketPING() = default;
};

class CPacketBYE : public CPacket
Expand All @@ -609,8 +607,7 @@ class CPacketBYE : public CPacket
{
m_PacketType = PT_BYE;
}
virtual ~CPacketBYE()
{ }
virtual ~CPacketBYE() = default;
};

class CPacketMOUSE : public CPacket
Expand Down Expand Up @@ -648,8 +645,7 @@ class CPacketMOUSE : public CPacket
m_Payload.push_back( (m_Y & 0x00ff));
}

virtual ~CPacketMOUSE()
{ }
virtual ~CPacketMOUSE() = default;
};

class CPacketLOG : public CPacket
Expand Down Expand Up @@ -693,8 +689,7 @@ class CPacketLOG : public CPacket
m_Payload.push_back('\0');
}

virtual ~CPacketLOG()
{ }
virtual ~CPacketLOG() = default;
};

class CPacketACTION : public CPacket
Expand Down Expand Up @@ -729,8 +724,7 @@ class CPacketACTION : public CPacket
m_Payload.push_back('\0');
}

virtual ~CPacketACTION()
{ }
virtual ~CPacketACTION() = default;
};

class CXBMCClient
Expand Down
4 changes: 1 addition & 3 deletions xbmc/AppParamParser.cpp
Expand Up @@ -23,9 +23,7 @@ CAppParamParser::CAppParamParser()
{
}

CAppParamParser::~CAppParamParser()
{
}
CAppParamParser::~CAppParamParser() = default;

void CAppParamParser::Parse(const char* const* argv, int nArgs)
{
Expand Down
5 changes: 0 additions & 5 deletions xbmc/ApplicationPlayer.cpp
Expand Up @@ -19,11 +19,6 @@
#include "guilib/GUIWindowManager.h"
#include "settings/MediaSettings.h"

CApplicationPlayer::CApplicationPlayer()
{

}

std::shared_ptr<IPlayer> CApplicationPlayer::GetInternal() const
{
CSingleLock lock(m_playerLock);
Expand Down
2 changes: 1 addition & 1 deletion xbmc/ApplicationPlayer.h
Expand Up @@ -31,7 +31,7 @@ struct TextCacheStruct_t;
class CApplicationPlayer
{
public:
CApplicationPlayer();
CApplicationPlayer() = default;

// player management
void ClosePlayer();
Expand Down
4 changes: 0 additions & 4 deletions xbmc/ApplicationStackHelper.cpp
Expand Up @@ -24,10 +24,6 @@ CApplicationStackHelper::CApplicationStackHelper(void)
{
}

CApplicationStackHelper::~CApplicationStackHelper(void)
{
}

void CApplicationStackHelper::Clear()
{
m_currentStackPosition = 0;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/ApplicationStackHelper.h
Expand Up @@ -15,7 +15,7 @@ class CApplicationStackHelper
{
public:
CApplicationStackHelper(void);
~CApplicationStackHelper(void);
~CApplicationStackHelper() = default;

void Clear();
void OnPlayBackStarted(const CFileItem& item);
Expand Down
4 changes: 1 addition & 3 deletions xbmc/ServiceManager.cpp
Expand Up @@ -35,9 +35,7 @@

using namespace KODI;

CServiceManager::CServiceManager()
{
}
CServiceManager::CServiceManager() = default;

CServiceManager::~CServiceManager()
{
Expand Down
8 changes: 1 addition & 7 deletions xbmc/addons/AddonVersion.h
Expand Up @@ -57,11 +57,5 @@ namespace ADDON
static int CompareComponent(const char *a, const char *b);
};

inline AddonVersion& AddonVersion::operator=(const AddonVersion& other)
{
mEpoch = other.mEpoch;
mUpstream = other.mUpstream;
mRevision = other.mRevision;
return *this;
}
inline AddonVersion& AddonVersion::operator=(const AddonVersion& other) = default;
}
Expand Up @@ -150,9 +150,7 @@ namespace addon
class PeripheralEvent
{
public:
PeripheralEvent(void)
{
}
PeripheralEvent() = default;

PeripheralEvent(unsigned int peripheralIndex, unsigned int buttonIndex, JOYSTICK_STATE_BUTTON state) :
m_type(PERIPHERAL_EVENT_TYPE_DRIVER_BUTTON),
Expand Down
3 changes: 1 addition & 2 deletions xbmc/commons/Buffer.h
Expand Up @@ -132,8 +132,7 @@ namespace XbmcCommons
* in the source buffer and vice/vrs. However, each buffer maintains
* its own indexing.
*/
inline Buffer(const Buffer& buf) : bufferRef(buf.bufferRef), buffer(buf.buffer),
mposition(buf.mposition), mcapacity(buf.mcapacity), mlimit(buf.mlimit) { }
inline Buffer(const Buffer& buf) = default;

/**
* Copy another buffer. This is a "shallow copy" and therefore
Expand Down
2 changes: 1 addition & 1 deletion xbmc/commons/Exception.h
Expand Up @@ -52,7 +52,7 @@ namespace XbmcCommons

inline explicit Exception(const char* classname_) : classname(classname_) { }
inline Exception(const char* classname_, const char* message_) : classname(classname_), message(message_) { }
inline Exception(const Exception& other) : classname(other.classname), message(other.message) { }
inline Exception(const Exception& other) = default;

/**
* This method is called from the constructor of subclasses. It
Expand Down
4 changes: 0 additions & 4 deletions xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.cpp
Expand Up @@ -29,10 +29,6 @@ CSoundPacket::~CSoundPacket()
CActiveAE::FreeSoundSample(data);
}

CSampleBuffer::CSampleBuffer()
{
}

CSampleBuffer::~CSampleBuffer()
{
delete pkt;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEBuffer.h
Expand Up @@ -45,7 +45,7 @@ class CActiveAEBufferPool;
class CSampleBuffer
{
public:
CSampleBuffer();
CSampleBuffer() = default;
~CSampleBuffer();
CSampleBuffer *Acquire();
void Return();
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.h
Expand Up @@ -29,7 +29,7 @@ class CAESinkDARWINIOS : public IAESink
virtual const char *GetName() { return "DARWINIOS"; }

CAESinkDARWINIOS();
virtual ~CAESinkDARWINIOS();
virtual ~CAESinkDARWINIOS() = default;

static void Register();
static void EnumerateDevicesEx(AEDeviceInfoList &list, bool force);
Expand Down
4 changes: 0 additions & 4 deletions xbmc/cores/AudioEngine/Sinks/AESinkDARWINIOS.mm
Expand Up @@ -583,10 +583,6 @@ static void EnumerateDevices(AEDeviceInfoList &list)
{
}

CAESinkDARWINIOS::~CAESinkDARWINIOS()
{
}

void CAESinkDARWINIOS::Register()
{
AE::AESinkRegEntry reg;
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/AudioEngine/Sinks/osx/AEDeviceEnumerationOSX.h
Expand Up @@ -40,7 +40,7 @@ class AEDeviceEnumerationOSX
*/
AEDeviceEnumerationOSX(AudioDeviceID deviceID);
// d'tor
~AEDeviceEnumerationOSX(){};
~AEDeviceEnumerationOSX() = default;

/*!
* @brief Gets the device list which was enumerated by the last call to Enumerate
Expand Down
12 changes: 1 addition & 11 deletions xbmc/cores/AudioEngine/Utils/AEAudioFormat.h
Expand Up @@ -66,16 +66,6 @@ struct AEAudioFormat
m_streamInfo == fmt.m_streamInfo;
}

AEAudioFormat& operator=(const AEAudioFormat& fmt)
{
m_dataFormat = fmt.m_dataFormat;
m_sampleRate = fmt.m_sampleRate;
m_channelLayout = fmt.m_channelLayout;
m_frames = fmt.m_frames;
m_frameSize = fmt.m_frameSize;
m_streamInfo = fmt.m_streamInfo;

return *this;
}
AEAudioFormat& operator=(const AEAudioFormat& fmt) = default;
};

2 changes: 1 addition & 1 deletion xbmc/cores/RetroPlayer/buffers/IRenderBuffer.h
Expand Up @@ -24,7 +24,7 @@ namespace RETRO
class IRenderBuffer
{
public:
virtual ~IRenderBuffer() { }
virtual ~IRenderBuffer() = default;

// Pool functions
virtual void Acquire() = 0;
Expand Down
6 changes: 1 addition & 5 deletions xbmc/cores/VideoPlayer/DVDCodecs/Overlay/DVDOverlayText.h
Expand Up @@ -66,11 +66,7 @@ class CDVDOverlayText : public CDVDOverlay
{
}

CElementText(CElementText& src)
: CElement(src),
m_text(src.m_text)
{
}
CElementText(CElementText& src) = default;

const std::string& GetText()
{ return m_text; }
Expand Down
Expand Up @@ -66,7 +66,7 @@ class CMediaCodecVideoBuffer : public CVideoBuffer
public:
CMediaCodecVideoBuffer(int id)
: CVideoBuffer(id){};
virtual ~CMediaCodecVideoBuffer(){};
virtual ~CMediaCodecVideoBuffer() = default;

void Set(int internalId,
int textureId,
Expand Down
4 changes: 0 additions & 4 deletions xbmc/cores/VideoPlayer/Process/android/ProcessInfoAndroid.cpp
Expand Up @@ -15,10 +15,6 @@ CProcessInfo* CProcessInfoAndroid::Create()
return new CProcessInfoAndroid();
}

CProcessInfoAndroid::CProcessInfoAndroid()
{
}

void CProcessInfoAndroid::Register()
{
CProcessInfo::RegisterProcessControl("android", CProcessInfoAndroid::Create);
Expand Down
Expand Up @@ -16,7 +16,7 @@ namespace VIDEOPLAYER
class CProcessInfoAndroid : public CProcessInfo
{
public:
CProcessInfoAndroid();
CProcessInfoAndroid() = default;
static CProcessInfo* Create();
static void Register();
EINTERLACEMETHOD GetFallbackDeintMethod() override;
Expand Down
4 changes: 0 additions & 4 deletions xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.cpp
Expand Up @@ -20,10 +20,6 @@ void CProcessInfoGBM::Register()
CProcessInfo::RegisterProcessControl("gbm", CProcessInfoGBM::Create);
}

CProcessInfoGBM::CProcessInfoGBM()
{
}

EINTERLACEMETHOD CProcessInfoGBM::GetFallbackDeintMethod()
{
#if defined(__arm__)
Expand Down
2 changes: 1 addition & 1 deletion xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h
Expand Up @@ -17,7 +17,7 @@ namespace VIDEOPLAYER
class CProcessInfoGBM : public CProcessInfo
{
public:
CProcessInfoGBM();
CProcessInfoGBM() = default;
static CProcessInfo* Create();
static void Register();
EINTERLACEMETHOD GetFallbackDeintMethod() override;
Expand Down
6 changes: 4 additions & 2 deletions xbmc/cores/VideoPlayer/VideoRenderers/ColorManager.cpp
Expand Up @@ -34,16 +34,18 @@ CColorManager::CColorManager()
#endif //defined(HAVE_LCMS2)
}

#if defined(HAVE_LCMS2)
CColorManager::~CColorManager()
{
#if defined(HAVE_LCMS2)
if (m_hProfile)
{
cmsCloseProfile(m_hProfile);
m_hProfile = nullptr;
}
#endif //defined(HAVE_LCMS2)
}
#else
CColorManager::~CColorManager() = default;
#endif //defined(HAVE_LCMS2)

bool CColorManager::IsEnabled() const
{
Expand Down
Expand Up @@ -36,10 +36,6 @@ bool CRendererVTB::Register()
return true;
}

CRendererVTB::CRendererVTB()
{
}

CRendererVTB::~CRendererVTB()
{
for (int i = 0; i < NUM_BUFFERS; ++i)
Expand Down
Expand Up @@ -14,7 +14,7 @@
class CRendererVTB : public CLinuxRendererGL
{
public:
CRendererVTB();
CRendererVTB() = default;
virtual ~CRendererVTB();

static CBaseRenderer* Create(CVideoBuffer *buffer);
Expand Down
Expand Up @@ -19,10 +19,6 @@

using namespace VAAPI;

CVaapi1Texture::CVaapi1Texture()
{
}

void CVaapi1Texture::Init(InteropInfo &interop)
{
m_interop = interop;
Expand Down
Expand Up @@ -61,7 +61,7 @@ class CVaapiTexture
class CVaapi1Texture : public CVaapiTexture
{
public:
CVaapi1Texture();
CVaapi1Texture() = default;

bool Map(CVaapiRenderPicture *pic) override;
void Unmap() override;
Expand Down
4 changes: 1 addition & 3 deletions xbmc/dbwrappers/qry_dat.h
Expand Up @@ -209,9 +209,7 @@ typedef query_data::iterator qry_itor;
class result_set
{
public:
result_set()
{
};
result_set() = default;
~result_set()
{
clear();
Expand Down