std::remove

// 从前往后删除空白占位
for (auto itr = items.begin(); itr != items.end(); itr++)
{
    if ((*itr)->getTag() == HANDCARD_SPACE_TAG || (*itr)->getTag() == HANDCARD_CPG_SPACE_TAG)
    {
        _listview->removeChild(*itr);
        _spaceList.erase(std::remove(_spaceList.begin(), _spaceList.end(), *itr), _spaceList.end());
    }
    else
    {
        break;
    }
}

你可能感兴趣的:(std::remove)