mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-17 18:41:29 +00:00
QGlobalCache::LoadBy to pass by reference
This commit is contained in:
parent
e9f6031936
commit
ec0989454d
@ -165,7 +165,7 @@ void QGlobalCache::LoadByGlobalContext()
|
|||||||
LoadBy(query);
|
LoadBy(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QGlobalCache::LoadBy(const std::string query)
|
void QGlobalCache::LoadBy(const std::string &query)
|
||||||
{
|
{
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = database.QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
@ -173,5 +173,4 @@ void QGlobalCache::LoadBy(const std::string query)
|
|||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row)
|
for (auto row = results.begin(); row != results.end(); ++row)
|
||||||
AddGlobal(0, QGlobal(std::string(row[0]), atoi(row[1]), atoi(row[2]), atoi(row[3]), row[4], row[5]? atoi(row[5]): 0xFFFFFFFF));
|
AddGlobal(0, QGlobal(std::string(row[0]), atoi(row[1]), atoi(row[2]), atoi(row[3]), row[4], row[5]? atoi(row[5]): 0xFFFFFFFF));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public:
|
|||||||
void LoadByZoneID(uint32 zoneID); //zone
|
void LoadByZoneID(uint32 zoneID); //zone
|
||||||
void LoadByGlobalContext(); //zone
|
void LoadByGlobalContext(); //zone
|
||||||
protected:
|
protected:
|
||||||
void LoadBy(const std::string query);
|
void LoadBy(const std::string &query);
|
||||||
std::list<QGlobal> qGlobalBucket;
|
std::list<QGlobal> qGlobalBucket;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user