mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
refactor(Core): apply clang-tidy modernize-* (#9975)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "StringFormat.h"
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/*! Transactions, high level class. */
|
||||
@@ -36,7 +37,7 @@ template <typename T>
|
||||
friend class DatabaseWorkerPool;
|
||||
|
||||
public:
|
||||
TransactionBase() : _cleanedUp(false) { }
|
||||
TransactionBase() = default;
|
||||
virtual ~TransactionBase() { Cleanup(); }
|
||||
|
||||
void Append(char const* sql);
|
||||
@@ -46,7 +47,7 @@ public:
|
||||
Append(Acore::StringFormat(std::forward<Format>(sql), std::forward<Args>(args)...).c_str());
|
||||
}
|
||||
|
||||
std::size_t GetSize() const { return m_queries.size(); }
|
||||
[[nodiscard]] std::size_t GetSize() const { return m_queries.size(); }
|
||||
|
||||
protected:
|
||||
void AppendPreparedStatement(PreparedStatementBase* statement);
|
||||
@@ -54,7 +55,7 @@ protected:
|
||||
std::vector<SQLElementData> m_queries;
|
||||
|
||||
private:
|
||||
bool _cleanedUp;
|
||||
bool _cleanedUp{false};
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
@@ -76,8 +77,8 @@ friend class DatabaseWorker;
|
||||
friend class TransactionCallback;
|
||||
|
||||
public:
|
||||
TransactionTask(std::shared_ptr<TransactionBase> trans) : m_trans(trans) { }
|
||||
~TransactionTask() { }
|
||||
TransactionTask(std::shared_ptr<TransactionBase> trans) : m_trans(std::move(trans)) { }
|
||||
~TransactionTask() override = default;
|
||||
|
||||
protected:
|
||||
bool Execute() override;
|
||||
|
||||
Reference in New Issue
Block a user