From 9cd2225f8c888db6bc0d9f20cee107a631a9e08f Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Thu, 10 Jul 2014 22:04:58 -0700 Subject: [PATCH] GlobalInstane converted to StringFormat --- common/database.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/database.cpp b/common/database.cpp index f4abb5a8c..7dcbf5e6b 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -2409,10 +2409,9 @@ void Database::SetInstanceDuration(uint16 instance_id, uint32 new_duration) bool Database::GlobalInstance(uint16 instance_id) { - char *query = nullptr; - - auto results = QueryDatabase(query, MakeAnyLenString(&query, "SELECT is_global from instance_list where id=%u LIMIT 1", instance_id)); - safe_delete_array(query); + + std::string query = StringFormat("SELECT is_global from instance_list where id=%u LIMIT 1", instance_id); + auto results = QueryDatabase(query); if (!results.Success()) return false;