mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-14 16:03:45 +00:00
refactor(Core): apply clang-tidy modernize-pass-by-value (#3823)
This commit is contained in:
@@ -10,9 +10,10 @@
|
||||
#undef max
|
||||
|
||||
#include <cstdio>
|
||||
#include <utility>
|
||||
|
||||
DBCFile::DBCFile(const std::string& filename):
|
||||
filename(filename), recordSize(0), recordCount(0), fieldCount(0), stringSize(0), data(nullptr), stringTable(nullptr)
|
||||
DBCFile::DBCFile(std::string filename):
|
||||
filename(std::move(filename)), recordSize(0), recordCount(0), fieldCount(0), stringSize(0), data(nullptr), stringTable(nullptr)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -9,11 +9,12 @@
|
||||
|
||||
#include <cassert>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
class DBCFile
|
||||
{
|
||||
public:
|
||||
DBCFile(const std::string& filename);
|
||||
DBCFile(std::string filename);
|
||||
~DBCFile();
|
||||
|
||||
// Open database. It must be openened before it can be used.
|
||||
@@ -25,7 +26,7 @@ public:
|
||||
class Exception
|
||||
{
|
||||
public:
|
||||
Exception(const std::string& message): message(message)
|
||||
Exception(std::string message): message(std::move(message))
|
||||
{ }
|
||||
virtual ~Exception() = default;
|
||||
const std::string& getMessage() {return message;}
|
||||
|
||||
@@ -4,14 +4,15 @@
|
||||
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
|
||||
*/
|
||||
|
||||
#include "vmapexport.h"
|
||||
#include "wmo.h"
|
||||
#include "vec3d.h"
|
||||
#include "vmapexport.h"
|
||||
#include <cassert>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
#include <map>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#undef min
|
||||
#undef max
|
||||
#include "mpq_libmpq04.h"
|
||||
@@ -124,8 +125,8 @@ bool WMORoot::ConvertToVMAPRootWmo(FILE* pOutfile)
|
||||
return true;
|
||||
}
|
||||
|
||||
WMOGroup::WMOGroup(const std::string& filename) :
|
||||
filename(filename), MOPY(nullptr), MOVI(nullptr), MoviEx(nullptr), MOVT(nullptr), MOBA(nullptr), MobaEx(nullptr),
|
||||
WMOGroup::WMOGroup(std::string filename) :
|
||||
filename(std::move(filename)), MOPY(nullptr), MOVI(nullptr), MoviEx(nullptr), MOVT(nullptr), MOBA(nullptr), MobaEx(nullptr),
|
||||
hlq(nullptr), LiquEx(nullptr), LiquBytes(nullptr), groupName(0), descGroupName(0), mogpFlags(0),
|
||||
moprIdx(0), moprNItems(0), nBatchA(0), nBatchB(0), nBatchC(0), fogIdx(0),
|
||||
liquidType(0), groupWMOID(0), mopy_size(0), moba_size(0), LiquEx_size(0),
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
int nTriangles; // number when loaded
|
||||
uint32 liquflags;
|
||||
|
||||
WMOGroup(std::string const& filename);
|
||||
WMOGroup(std::string filename);
|
||||
~WMOGroup();
|
||||
|
||||
bool open();
|
||||
|
||||
Reference in New Issue
Block a user