void CEventHandler::ListRemove(EventClientList& ecList, CEventClient* ec) { // FIXME: efficient, hardly EventClientList newList; newList.reserve(ecList.size()); for (size_t i = 0; i < ecList.size(); i++) { if (ec != ecList[i]) { newList.push_back(ecList[i]); } } ecList.swap(newList); }
void CEventHandler::ListRemove(EventClientList& ecList, CEventClient* ec) { // FIXME: efficient, hardly EventClientList newList; for (int i = 0; i < ecList.size(); i++) { if (ec != ecList[i]) { newList.push_back(ecList[i]); } } ecList = newList; }