From 585ccc1b24816e54f23278c9368a67d2d4b1e3a5 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sat, 6 May 2017 13:02:02 +0200 Subject: [PATCH] core: use = default instead of trivial constructor/destructor reported by clang-tidy Note: drop throw() specifier as it is the 'default' in C++11 for destructor --- pcsx2/CDVD/IsoFS/IsoDirectory.h | 2 +- pcsx2/CDVD/IsoFS/IsoFS.cpp | 4 ---- pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp | 4 ---- pcsx2/CDVD/IsoFS/IsoFSCDVD.h | 2 +- pcsx2/CDVD/IsoFS/IsoFile.cpp | 4 ---- pcsx2/CDVD/IsoFS/IsoFile.h | 2 +- pcsx2/IopBios.cpp | 2 +- pcsx2/Linux/LnxConsolePipe.cpp | 6 +----- pcsx2/SaveState.cpp | 2 -- pcsx2/SaveState.h | 2 +- pcsx2/System.cpp | 2 +- pcsx2/System/SysThreadBase.cpp | 4 ---- pcsx2/System/SysThreads.h | 2 +- 13 files changed, 8 insertions(+), 30 deletions(-) diff --git a/pcsx2/CDVD/IsoFS/IsoDirectory.h b/pcsx2/CDVD/IsoFS/IsoDirectory.h index 56626da0b7..39dce3763d 100644 --- a/pcsx2/CDVD/IsoFS/IsoDirectory.h +++ b/pcsx2/CDVD/IsoFS/IsoDirectory.h @@ -31,7 +31,7 @@ public: public: IsoDirectory(SectorSource& r); IsoDirectory(SectorSource& r, IsoFileDescriptor directoryEntry); - virtual ~IsoDirectory() throw(); + virtual ~IsoDirectory() = default; wxString FStype_ToString() const; SectorSource& GetReader() const { return internalReader; } diff --git a/pcsx2/CDVD/IsoFS/IsoFS.cpp b/pcsx2/CDVD/IsoFS/IsoFS.cpp index 2925edec3a..efa7b46373 100644 --- a/pcsx2/CDVD/IsoFS/IsoFS.cpp +++ b/pcsx2/CDVD/IsoFS/IsoFS.cpp @@ -110,10 +110,6 @@ IsoDirectory::IsoDirectory(SectorSource& r, IsoFileDescriptor directoryEntry) Init(directoryEntry); } -IsoDirectory::~IsoDirectory() throw() -{ -} - void IsoDirectory::Init(const IsoFileDescriptor& directoryEntry) { // parse directory sector diff --git a/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp b/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp index c4773fc839..cc0f8f0da4 100644 --- a/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp +++ b/pcsx2/CDVD/IsoFS/IsoFSCDVD.cpp @@ -35,7 +35,3 @@ int IsoFSCDVD::getNumSectors() return td.lsn; } - -IsoFSCDVD::~IsoFSCDVD() throw() -{ -} diff --git a/pcsx2/CDVD/IsoFS/IsoFSCDVD.h b/pcsx2/CDVD/IsoFS/IsoFSCDVD.h index 8f6e7873ad..ebfd891ee8 100644 --- a/pcsx2/CDVD/IsoFS/IsoFSCDVD.h +++ b/pcsx2/CDVD/IsoFS/IsoFSCDVD.h @@ -23,7 +23,7 @@ class IsoFSCDVD: public SectorSource { public: IsoFSCDVD(); - virtual ~IsoFSCDVD() throw(); + virtual ~IsoFSCDVD() = default; virtual bool readSector(unsigned char* buffer, int lba); diff --git a/pcsx2/CDVD/IsoFS/IsoFile.cpp b/pcsx2/CDVD/IsoFS/IsoFile.cpp index 964cc2778d..51c466ca4e 100644 --- a/pcsx2/CDVD/IsoFS/IsoFile.cpp +++ b/pcsx2/CDVD/IsoFS/IsoFile.cpp @@ -53,10 +53,6 @@ void IsoFile::Init() internalReader.readSector(currentSector, currentSectorNumber); } -IsoFile::~IsoFile() throw() -{ -} - u32 IsoFile::seek(u32 absoffset) { u32 endOffset = absoffset; diff --git a/pcsx2/CDVD/IsoFS/IsoFile.h b/pcsx2/CDVD/IsoFS/IsoFile.h index e266afe204..908db8840a 100644 --- a/pcsx2/CDVD/IsoFS/IsoFile.h +++ b/pcsx2/CDVD/IsoFS/IsoFile.h @@ -38,7 +38,7 @@ public: IsoFile(const IsoDirectory& dir, const wxString& filename); IsoFile(SectorSource& reader, const wxString& filename); IsoFile(SectorSource& reader, const IsoFileDescriptor& fileEntry); - virtual ~IsoFile() throw(); + virtual ~IsoFile() = default; u32 seek(u32 absoffset); u32 seek(s64 offset, wxSeekMode ref_position); diff --git a/pcsx2/IopBios.cpp b/pcsx2/IopBios.cpp index b3efda6993..970dcef66b 100644 --- a/pcsx2/IopBios.cpp +++ b/pcsx2/IopBios.cpp @@ -143,7 +143,7 @@ public: fd = hostfd; } - virtual ~HostFile() {} + virtual ~HostFile() = default; static __fi int translate_error(int err) { diff --git a/pcsx2/Linux/LnxConsolePipe.cpp b/pcsx2/Linux/LnxConsolePipe.cpp index 2bf5a6d290..5d97399c58 100644 --- a/pcsx2/Linux/LnxConsolePipe.cpp +++ b/pcsx2/Linux/LnxConsolePipe.cpp @@ -137,7 +137,7 @@ protected: public: LinuxPipeRedirection(FILE* stdstream); - virtual ~LinuxPipeRedirection() noexcept; + virtual ~LinuxPipeRedirection() = default; }; LinuxPipeRedirection::LinuxPipeRedirection(FILE* stdstream) @@ -154,10 +154,6 @@ LinuxPipeRedirection::LinuxPipeRedirection(FILE* stdstream) } } -LinuxPipeRedirection::~LinuxPipeRedirection() noexcept -{ -} - PipeRedirectionBase* NewPipeRedir(FILE* stdstream) { try { diff --git a/pcsx2/SaveState.cpp b/pcsx2/SaveState.cpp index a726f26bf8..3e90d2d8c3 100644 --- a/pcsx2/SaveState.cpp +++ b/pcsx2/SaveState.cpp @@ -315,8 +315,6 @@ memLoadingState::memLoadingState( const SafeArray* load_from ) { } -memLoadingState::~memLoadingState() throw() { } - // Loading of state data from a memory buffer... void memLoadingState::FreezeMem( void* data, int size ) { diff --git a/pcsx2/SaveState.h b/pcsx2/SaveState.h index 6817813bf6..e5ae0f5a41 100644 --- a/pcsx2/SaveState.h +++ b/pcsx2/SaveState.h @@ -247,7 +247,7 @@ public: class memLoadingState : public SaveStateBase { public: - virtual ~memLoadingState() throw(); + virtual ~memLoadingState() = default; memLoadingState( const VmStateBuffer& load_from ); memLoadingState( const VmStateBuffer* load_from ); diff --git a/pcsx2/System.cpp b/pcsx2/System.cpp index 2c47b8ab2e..4f4bf1a7f6 100644 --- a/pcsx2/System.cpp +++ b/pcsx2/System.cpp @@ -344,7 +344,7 @@ public: public: CpuInitializerSet() {} - virtual ~CpuInitializerSet() throw() {} + virtual ~CpuInitializerSet() = default; }; diff --git a/pcsx2/System/SysThreadBase.cpp b/pcsx2/System/SysThreadBase.cpp index 3845b2c889..d55f0b74b4 100644 --- a/pcsx2/System/SysThreadBase.cpp +++ b/pcsx2/System/SysThreadBase.cpp @@ -29,10 +29,6 @@ SysThreadBase::SysThreadBase() : { } -SysThreadBase::~SysThreadBase() throw() -{ -} - void SysThreadBase::Start() { _parent::Start(); diff --git a/pcsx2/System/SysThreads.h b/pcsx2/System/SysThreads.h index caead7ba25..c710969295 100644 --- a/pcsx2/System/SysThreads.h +++ b/pcsx2/System/SysThreads.h @@ -82,7 +82,7 @@ protected: public: explicit SysThreadBase(); - virtual ~SysThreadBase() throw(); + virtual ~SysThreadBase() = default; // Thread safety for IsOpen / IsClosed: The execution mode can change at any time on // any thread, so the actual status may have already changed by the time this function