From 71da40c75761295122889a25ecbe99828d60179e Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Thu, 10 Jul 2014 17:17:06 -0700 Subject: [PATCH] ClearRaid 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 8eb895f34..6bdb1eacf 100644 --- a/common/database.cpp +++ b/common/database.cpp @@ -1829,8 +1829,7 @@ void Database::SetAgreementFlag(uint32 acctid) } void Database::ClearRaid(uint32 rid) { - char *query = nullptr; - + if(rid == 0) { //clear all raids @@ -1839,8 +1838,8 @@ void Database::ClearRaid(uint32 rid) { } //clear a specific group - auto results = QueryDatabase(query, MakeAnyLenString(&query, "delete from raid_members where raidid = %lu", (unsigned long)rid)); - safe_delete_array(query); + std::string query = StringFormat("delete from raid_members where raidid = %lu", (unsigned long)rid); + auto results = QueryDatabase(query); if (!results.Success()) std::cout << "Unable to clear raids: " << results.ErrorMessage() << std::endl;