refactor(Core): apply clang-tidy modernize-use-equals-default (#3834)

This commit is contained in:
Francesco Borzì
2020-12-07 19:21:55 +01:00
committed by GitHub
parent 0b8ec1f6ee
commit 1cf39b3d22
35 changed files with 48 additions and 56 deletions

View File

@@ -39,7 +39,7 @@ namespace VMAP
public:
IVMapManager() : iEnableLineOfSightCalc(true), iEnableHeightCalc(true) { }
virtual ~IVMapManager() { }
virtual ~IVMapManager() = default;
virtual int loadMap(const char* pBasePath, unsigned int pMapId, int x, int y) = 0;

View File

@@ -38,7 +38,7 @@ public:
/* Activity state */
DatabaseWorkerPool();
~DatabaseWorkerPool() { }
~DatabaseWorkerPool() = default;
bool Open(const std::string& infoString, uint8 async_threads, uint8 synch_threads);

View File

@@ -27,7 +27,7 @@ enum ConnectionFlags
struct MySQLConnectionInfo
{
MySQLConnectionInfo() { }
MySQLConnectionInfo() = default;
MySQLConnectionInfo(const std::string& infoString)
{
Tokenizer tokens(infoString, ';');

View File

@@ -16,7 +16,7 @@ private:
typedef std::pair<SQLElementData, SQLResultSetUnion> SQLResultPair;
std::vector<SQLResultPair> m_queries;
public:
SQLQueryHolder() { }
SQLQueryHolder() = default;
~SQLQueryHolder();
bool SetQuery(size_t index, const char* sql);
bool SetPQuery(size_t index, const char* format, ...) ATTR_PRINTF(3, 4);

View File

@@ -49,7 +49,7 @@ class TransactionTask : public SQLOperation
public:
TransactionTask(SQLTransaction trans) : m_trans(trans) { } ;
~TransactionTask() override { };
~TransactionTask() override = default;
protected:
bool Execute() override;

View File

@@ -15,7 +15,7 @@ template <class TO, class FROM> class RefManager : public LinkedListHead
{
public:
typedef LinkedListHead::Iterator< Reference<TO, FROM>> iterator;
RefManager() { }
RefManager() = default;
virtual ~RefManager() { clearReferences(); }
Reference<TO, FROM>* getFirst() { return ((Reference<TO, FROM>*) LinkedListHead::getFirst()); }

View File

@@ -28,7 +28,7 @@ protected:
virtual void sourceObjectDestroyLink() = 0;
public:
Reference() { iRefTo = nullptr; iRefFrom = nullptr; }
virtual ~Reference() { }
virtual ~Reference() = default;
// Create new link
void link(TO* toObj, FROM* fromObj)

View File

@@ -22,7 +22,7 @@
class ByteBufferException : public std::exception
{
public:
~ByteBufferException() noexcept override { }
~ByteBufferException() noexcept override = default;
[[nodiscard]] char const* what() const noexcept override { return msg_.c_str(); }
@@ -37,15 +37,14 @@ class ByteBufferPositionException : public ByteBufferException
{
public:
ByteBufferPositionException(bool add, size_t pos, size_t size, size_t valueSize);
~ByteBufferPositionException() noexcept override { }
~ByteBufferPositionException() noexcept override = default;
};
class ByteBufferSourceException : public ByteBufferException
{
public:
ByteBufferSourceException(size_t pos, size_t size, size_t valueSize);
~ByteBufferSourceException() noexcept override { }
~ByteBufferSourceException() noexcept override = default;
};
class ByteBuffer

View File

@@ -36,9 +36,7 @@ namespace ACE_Based
}
//! Destroy a LockedQueue.
virtual ~LockedQueue()
{
}
virtual ~LockedQueue() = default;
//! Adds an item to the queue.
void add(const T& item)

View File

@@ -18,7 +18,7 @@ namespace acore
class Runnable
{
public:
virtual ~Runnable() {}
virtual ~Runnable() = default;
virtual void run() = 0;
void incReference() { ++m_refs; }

View File

@@ -22,7 +22,7 @@ public:
m_addTime = 0;
m_execTime = 0;
}
virtual ~BasicEvent() { } // override destructor to perform some actions on event removal
virtual ~BasicEvent() = default; // override destructor to perform some actions on event removal
// this method executes when the event is triggered
// return false if event does not want to be deleted