mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[6899] Pass const reference instead of value for some strings in some functions.
Signed-off-by: hunuza <hunuza@gmail.com>
This commit is contained in:
parent
d386a67d27
commit
0f12997ef1
40 changed files with 108 additions and 108 deletions
|
|
@ -128,7 +128,7 @@ DBCStorage <WorldSafeLocsEntry> sWorldSafeLocsStore(WorldSafeLocsEntryfmt);
|
|||
|
||||
typedef std::list<std::string> StoreProblemList;
|
||||
|
||||
static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, std::string filename)
|
||||
static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, const std::string& filename)
|
||||
{
|
||||
sLog.outError("ERROR: Size of '%s' setted by format string (%u) not equal size of C++ structure (%u).",filename.c_str(),fsize,rsize);
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ static bool LoadDBC_assert_print(uint32 fsize,uint32 rsize, std::string filename
|
|||
}
|
||||
|
||||
template<class T>
|
||||
inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, std::string dbc_path, std::string filename)
|
||||
inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList& errlist, DBCStorage<T>& storage, const std::string& dbc_path, const std::string& filename)
|
||||
{
|
||||
// compatibility format and C++ structure sizes
|
||||
assert(DBCFile::GetFormatRecordSize(storage.GetFormat()) == sizeof(T) || LoadDBC_assert_print(DBCFile::GetFormatRecordSize(storage.GetFormat()),sizeof(T),filename));
|
||||
|
|
@ -172,7 +172,7 @@ inline void LoadDBC(uint32& availableDbcLocales,barGoLink& bar, StoreProblemList
|
|||
}
|
||||
}
|
||||
|
||||
void LoadDBCStores(std::string dataPath)
|
||||
void LoadDBCStores(const std::string& dataPath)
|
||||
{
|
||||
std::string dbcPath = dataPath+"dbc/";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue