本文整理汇总了C++中CSelectedUnits::erase方法的典型用法代码示例。如果您正苦于以下问题:C++ CSelectedUnits::erase方法的具体用法?C++ CSelectedUnits::erase怎么用?C++ CSelectedUnits::erase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSelectedUnits
的用法示例。
在下文中一共展示了CSelectedUnits::erase方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DependentDied
void CSelectedUnits::DependentDied(CObject *o)
{
GML_RECMUTEX_LOCK(sel); // DependentDied - maybe superfluous, too late anyway
selectedUnits.erase((CUnit*)o);
selectionChanged=true;
possibleCommandsChanged=true;
}
示例2: RemoveUnit
void CSelectedUnits::RemoveUnit(CUnit* unit)
{
GML_RECMUTEX_LOCK(sel); // RemoveUnit
selectedUnits.erase(unit);
DeleteDeathDependence(unit);
selectionChanged=true;
possibleCommandsChanged=true;
selectedGroup=-1;
unit->commandAI->selected=false;
}
示例3: RemoveUnit
void CSelectedUnits::RemoveUnit(CUnit* unit)
{
GML_RECMUTEX_LOCK(sel); // RemoveUnit
if (selectedUnits.erase(unit))
DeleteDeathDependence(unit, DEPENDENCE_SELECTED);
selectionChanged = true;
possibleCommandsChanged = true;
selectedGroup = -1;
unit->isSelected = false;
}
示例4: RemoveUnit
void CSelectedUnits::RemoveUnit(CUnit* unit)
{
selectedUnits.erase(unit);
DeleteDeathDependence(unit);
selectionChanged=true;
possibleCommandsChanged=true;
selectedGroup=-1;
PUSH_CODE_MODE;
ENTER_MIXED;
unit->commandAI->selected=false;
POP_CODE_MODE;
}
示例5: DependentDied
void CSelectedUnits::DependentDied(CObject *o)
{
selectedUnits.erase((CUnit*)o);
selectionChanged=true;
possibleCommandsChanged=true;
}