ClearRaid converted to StringFormat

This commit is contained in:
Arthur Ice 2014-07-10 17:17:06 -07:00
parent 3cf9c71c27
commit 71da40c757

View File

@ -1829,7 +1829,6 @@ void Database::SetAgreementFlag(uint32 acctid)
} }
void Database::ClearRaid(uint32 rid) { void Database::ClearRaid(uint32 rid) {
char *query = nullptr;
if(rid == 0) if(rid == 0)
{ {
@ -1839,8 +1838,8 @@ void Database::ClearRaid(uint32 rid) {
} }
//clear a specific group //clear a specific group
auto results = QueryDatabase(query, MakeAnyLenString(&query, "delete from raid_members where raidid = %lu", (unsigned long)rid)); std::string query = StringFormat("delete from raid_members where raidid = %lu", (unsigned long)rid);
safe_delete_array(query); auto results = QueryDatabase(query);
if (!results.Success()) if (!results.Success())
std::cout << "Unable to clear raids: " << results.ErrorMessage() << std::endl; std::cout << "Unable to clear raids: " << results.ErrorMessage() << std::endl;