diff --git a/zone/qglobals.cpp b/zone/qglobals.cpp index 53f64670b..f63e13dd4 100644 --- a/zone/qglobals.cpp +++ b/zone/qglobals.cpp @@ -165,13 +165,12 @@ void QGlobalCache::LoadByGlobalContext() LoadBy(query); } -void QGlobalCache::LoadBy(const std::string query) +void QGlobalCache::LoadBy(const std::string &query) { - auto results = database.QueryDatabase(query); - if (!results.Success()) - return; - - 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)); + auto results = database.QueryDatabase(query); + if (!results.Success()) + return; + 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)); } diff --git a/zone/qglobals.h b/zone/qglobals.h index b879cba97..5f0938a20 100644 --- a/zone/qglobals.h +++ b/zone/qglobals.h @@ -42,7 +42,7 @@ public: void LoadByZoneID(uint32 zoneID); //zone void LoadByGlobalContext(); //zone protected: - void LoadBy(const std::string query); + void LoadBy(const std::string &query); std::list qGlobalBucket; };