Core: Do not use STL container size method to check if container is empty

This commit is contained in:
Spp-
2011-07-01 14:58:44 +02:00
parent ce75ced741
commit bb921ae78c
17 changed files with 34 additions and 30 deletions
+1 -1
View File
@@ -18588,7 +18588,7 @@ void Player::_SaveMail(SQLTransaction& trans)
{
trans->PAppend("UPDATE mail SET has_items = '%u', expire_time = '" UI64FMTD "', deliver_time = '" UI64FMTD "', money = '%u', cod = '%u', checked = '%u' WHERE id = '%u'",
m->HasItems() ? 1 : 0, (uint64)m->expire_time, (uint64)m->deliver_time, m->money, m->COD, m->checked, m->messageID);
if (m->removedItems.size())
if (!m->removedItems.empty())
{
for (std::vector<uint32>::iterator itr2 = m->removedItems.begin(); itr2 != m->removedItems.end(); ++itr2)
trans->PAppend("DELETE FROM mail_items WHERE item_guid = '%u'", *itr2);