mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
refactor(Core): apply clang-tidy modernize-pass-by-value (#3823)
This commit is contained in:
@@ -8,13 +8,14 @@
|
||||
#define _ADDONMGR_H
|
||||
|
||||
#include "Define.h"
|
||||
#include <string>
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
struct AddonInfo
|
||||
{
|
||||
AddonInfo(const std::string& name, uint8 enabled, uint32 crc, uint8 state, bool crcOrPubKey)
|
||||
: Name(name), Enabled(enabled), CRC(crc), State(state), UsePublicKeyOrCRC(crcOrPubKey) {}
|
||||
AddonInfo(std::string name, uint8 enabled, uint32 crc, uint8 state, bool crcOrPubKey)
|
||||
: Name(std::move(name)), Enabled(enabled), CRC(crc), State(state), UsePublicKeyOrCRC(crcOrPubKey) {}
|
||||
|
||||
std::string Name;
|
||||
uint8 Enabled;
|
||||
@@ -25,7 +26,7 @@ struct AddonInfo
|
||||
|
||||
struct SavedAddon
|
||||
{
|
||||
SavedAddon(const std::string& name, uint32 crc) : Name(name)
|
||||
SavedAddon(std::string name, uint32 crc) : Name(std::move(name))
|
||||
{
|
||||
CRC = crc;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
||||
struct AuctionEntry;
|
||||
struct CalendarEvent;
|
||||
@@ -110,8 +111,8 @@ public: // Constructors
|
||||
explicit MailDraft(uint16 mailTemplateId, bool need_items = true)
|
||||
: m_mailTemplateId(mailTemplateId), m_mailTemplateItemsNeed(need_items), m_money(0), m_COD(0)
|
||||
{}
|
||||
MailDraft(std::string const& subject, std::string const& body)
|
||||
: m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) {}
|
||||
MailDraft(std::string subject, std::string body)
|
||||
: m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(std::move(subject)), m_body(std::move(body)), m_money(0), m_COD(0) {}
|
||||
public: // Accessors
|
||||
[[nodiscard]] uint16 GetMailTemplateId() const { return m_mailTemplateId; }
|
||||
[[nodiscard]] std::string const& GetSubject() const { return m_subject; }
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
#ifndef __WORLDSESSION_H
|
||||
#define __WORLDSESSION_H
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "Common.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "AddonMgr.h"
|
||||
@@ -159,8 +161,8 @@ class CharacterCreateInfo
|
||||
friend class Player;
|
||||
|
||||
protected:
|
||||
CharacterCreateInfo(std::string const& name, uint8 race, uint8 cclass, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId,
|
||||
WorldPacket& data) : Name(name), Race(race), Class(cclass), Gender(gender), Skin(skin), Face(face), HairStyle(hairStyle), HairColor(hairColor), FacialHair(facialHair),
|
||||
CharacterCreateInfo(std::string name, uint8 race, uint8 cclass, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId,
|
||||
WorldPacket& data) : Name(std::move(name)), Race(race), Class(cclass), Gender(gender), Skin(skin), Face(face), HairStyle(hairStyle), HairColor(hairColor), FacialHair(facialHair),
|
||||
OutfitId(outfitId), Data(data), CharCount(0)
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user