当前位置: 首页>>代码示例>>C++>>正文


C++ list::remove方法代码示例

本文整理汇总了C++中std::list::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ list::remove方法的具体用法?C++ list::remove怎么用?C++ list::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在std::list的用法示例。


在下文中一共展示了list::remove方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: destroyGUIOverlay

 void destroyGUIOverlay(CGUIOverlay *pOverlay) {m_lGUIOverlays.remove(pOverlay); delete pOverlay;}
开发者ID:ChWick,项目名称:Mencus,代码行数:1,代码来源:GUIManager.hpp

示例2: FilterTargets

 void FilterTargets(std::list<WorldObject*>& targets)
 {
     if (GetExplTargetUnit())
         targets.remove(GetExplTargetUnit());
 }
开发者ID:Loukie,项目名称:SkyFireEMU,代码行数:5,代码来源:spell_warlock.cpp

示例3: FilterTargets

 void FilterTargets(std::list<WorldObject*>& unitList)
 {
     if (GetCaster())
         unitList.remove(GetCaster());
 }
开发者ID:AwkwardDev,项目名称:TinyCore,代码行数:5,代码来源:spell_warrior.cpp

示例4: CurveTree

void CurveTree::MakeOffsets2()
{
    // make offsets

    if(CArea::m_please_abort)return;
    CArea smaller;
    smaller.m_curves.push_back(curve);
    smaller.Offset(pocket_params->stepover);

    if(CArea::m_please_abort)return;

    // test islands
    for(std::list<const IslandAndOffset*>::iterator It = offset_islands.begin(); It != offset_islands.end();)
    {
        const IslandAndOffset* island_and_offset = *It;

        if(GetOverlapType(island_and_offset->offset, smaller) == eInside)
            It++; // island is still inside
        else
        {
            inners.push_back(new CurveTree(*island_and_offset->island));
            islands_added.push_back(inners.back());
            inners.back()->point_on_parent = curve.NearestPoint(*island_and_offset->island);
            if(CArea::m_please_abort)return;
            Point island_point = island_and_offset->island->NearestPoint(inners.back()->point_on_parent);
            if(CArea::m_please_abort)return;
            inners.back()->curve.ChangeStart(island_point);
            if(CArea::m_please_abort)return;

            // add the island offset's inner curves
            for(std::list<CCurve>::const_iterator It2 = island_and_offset->island_inners.begin(); It2 != island_and_offset->island_inners.end(); It2++)
            {
                const CCurve& island_inner = *It2;
                inners.back()->inners.push_back(new CurveTree(island_inner));
                inners.back()->inners.back()->point_on_parent = inners.back()->curve.NearestPoint(island_inner);
                if(CArea::m_please_abort)return;
                Point island_point = island_inner.NearestPoint(inners.back()->inners.back()->point_on_parent);
                if(CArea::m_please_abort)return;
                inners.back()->inners.back()->curve.ChangeStart(island_point);
                to_do_list_for_MakeOffsets.push_back(inners.back()->inners.back()); // do it later, in a while loop
                if(CArea::m_please_abort)return;
            }

            smaller.Subtract(island_and_offset->offset);

            std::set<const IslandAndOffset*> added;

            std::list<IslandAndOffsetLink> touching_list;
            for(std::list<IslandAndOffset*>::const_iterator It2 = island_and_offset->touching_offsets.begin(); It2 != island_and_offset->touching_offsets.end(); It2++)
            {
                const IslandAndOffset* touching = *It2;
                touching_list.push_back(IslandAndOffsetLink(touching, inners.back()));
                added.insert(touching);
            }

            while(touching_list.size() > 0)
            {
                IslandAndOffsetLink touching = touching_list.front();
                touching_list.pop_front();
                touching.add_to->inners.push_back(new CurveTree(*touching.island_and_offset->island));
                islands_added.push_back(touching.add_to->inners.back());
                touching.add_to->inners.back()->point_on_parent = touching.add_to->curve.NearestPoint(*touching.island_and_offset->island);
                Point island_point = touching.island_and_offset->island->NearestPoint(touching.add_to->inners.back()->point_on_parent);
                touching.add_to->inners.back()->curve.ChangeStart(island_point);
                smaller.Subtract(touching.island_and_offset->offset);

                // add the island offset's inner curves
                for(std::list<CCurve>::const_iterator It2 = touching.island_and_offset->island_inners.begin(); It2 != touching.island_and_offset->island_inners.end(); It2++)
                {
                    const CCurve& island_inner = *It2;
                    touching.add_to->inners.back()->inners.push_back(new CurveTree(island_inner));
                    touching.add_to->inners.back()->inners.back()->point_on_parent = touching.add_to->inners.back()->curve.NearestPoint(island_inner);
                    if(CArea::m_please_abort)return;
                    Point island_point = island_inner.NearestPoint(touching.add_to->inners.back()->inners.back()->point_on_parent);
                    if(CArea::m_please_abort)return;
                    touching.add_to->inners.back()->inners.back()->curve.ChangeStart(island_point);
                    to_do_list_for_MakeOffsets.push_back(touching.add_to->inners.back()->inners.back()); // do it later, in a while loop
                    if(CArea::m_please_abort)return;
                }

                for(std::list<IslandAndOffset*>::const_iterator It2 = touching.island_and_offset->touching_offsets.begin(); It2 != touching.island_and_offset->touching_offsets.end(); It2++)
                {
                    if(added.find(*It2)==added.end() && ((*It2) != island_and_offset))
                    {
                        touching_list.push_back(IslandAndOffsetLink(*It2, touching.add_to->inners.back()));
                        added.insert(*It2);
                    }
                }
            }

            if(CArea::m_please_abort)return;
            It = offset_islands.erase(It);

            for(std::set<const IslandAndOffset*>::iterator It2 = added.begin(); It2 != added.end(); It2++)
            {
                const IslandAndOffset* i = *It2;
                offset_islands.remove(i);
            }

            if(offset_islands.size() == 0)break;
//.........这里部分代码省略.........
开发者ID:rvt,项目名称:libarea,代码行数:101,代码来源:AreaPocket.cpp

示例5: removeCollider

 void removeCollider(Collider* collider)
 {
     PS_ColliderSet::removeCollider(collider->_getImplementation());
     mCollider.remove(collider);
 }
开发者ID:brock7,项目名称:TianLong,代码行数:5,代码来源:ScorpioCollision.cpp

示例6: del_aux_barrier

 void del_aux_barrier(gc::WriteBarrier* wb) {
   aux_barriers_.remove(wb);
 }
开发者ID:atoulme,项目名称:rubinius,代码行数:3,代码来源:objectmemory.hpp

示例7: removeRegTainted

bool removeRegTainted(REG reg)
{
  switch(reg){

    case REG_EAX:  regsTainted.remove(REG_EAX);
    case REG_AX:   regsTainted.remove(REG_AX);
    case REG_AH:   regsTainted.remove(REG_AH);
    case REG_AL:   regsTainted.remove(REG_AL);
         break;

    case REG_EBX:  regsTainted.remove(REG_EBX);
    case REG_BX:   regsTainted.remove(REG_BX);
    case REG_BH:   regsTainted.remove(REG_BH);
    case REG_BL:   regsTainted.remove(REG_BL);
         break;

    case REG_ECX:  regsTainted.remove(REG_ECX);
    case REG_CX:   regsTainted.remove(REG_CX);
    case REG_CH:   regsTainted.remove(REG_CH);
    case REG_CL:   regsTainted.remove(REG_CL);
         break;

    case REG_EDX:  regsTainted.remove(REG_EDX); 
    case REG_DX:   regsTainted.remove(REG_DX); 
    case REG_DH:   regsTainted.remove(REG_DH); 
    case REG_DL:   regsTainted.remove(REG_DL); 
         break;

    case REG_EDI:  regsTainted.remove(REG_EDI); 
    case REG_DI:   regsTainted.remove(REG_DI); 
         break;

    case REG_ESI:  regsTainted.remove(REG_ESI); 
    case REG_SI:   regsTainted.remove(REG_SI); 
         break;

    default:
      return false;
  }
  std::cout << "\t\t\t" << REG_StringShort(reg) << " is now freed" << std::endl;
  return true;
}
开发者ID:cl-wood,项目名称:stubble,代码行数:42,代码来源:example3.cpp

示例8: DeleteSocket

void DeleteSocket(SOCKET *s)
{
    socketlistmtx.lock();
    activeSocket.remove(s);
    socketlistmtx.unlock();
}
开发者ID:Althasandrian,项目名称:PredictionAndReconciliation,代码行数:6,代码来源:ServerMain.cpp

示例9: FilterTargets

 void FilterTargets(std::list<WorldObject*>& targets)
 {
     targets.remove(GetExplTargetUnit()); // The target of this spell should _not_ be in this list
 }
开发者ID:GlobalWoW,项目名称:TrinityCore,代码行数:4,代码来源:boss_general_vezax.cpp

示例10:

void
dlgWaypointSelectAddToLastUsed(const Waypoint &waypoint)
{
  last_used_waypoint_ids.remove(waypoint.id);
  last_used_waypoint_ids.push_back(waypoint.id);
}
开发者ID:mobotics,项目名称:XCSoar,代码行数:6,代码来源:dlgWaypointSelect.cpp

示例11: full_unlink

	void full_unlink(bt_swarm_full_t *full)	throw()	{ full_db.remove(full);		}
开发者ID:jeromeetienne,项目名称:neoip,代码行数:1,代码来源:neoip_bt_swarm.hpp

示例12: WndProc_Hook

LRESULT APIENTRY WndProc_Hook(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    bool bFocused = (GetForegroundWindow() == hWnd);

    // Are we focused?
    if(bFocused)
    {
        if(uMsg == WM_KILLFOCUS || (uMsg == WM_ACTIVATE && LOWORD(wParam) == WA_INACTIVE))
        {
            return true;
        }

        if(uMsg == WM_KEYUP)
        {
            switch(wParam)
            {
            case VK_F12:
            {
                TerminateProcess(GetCurrentProcess(), 0);
            }
            case VK_F8:
            {
                // Take a screen shot
                if(CSnapShot::Take())
                    g_pCore->GetChat()->Outputf(false, "Screen shot captured.");
                else
                {
                    g_pCore->GetChat()->Outputf(false, "Screen shot capture failed (%s).", CSnapShot::GetError().Get());
                    CSnapShot::Reset();
                }
            }
            }
        }

        if(g_pCore->GetChat())
            g_pCore->GetChat()->HandleUserInput(uMsg, (DWORD)wParam);

        // Is the chat input not visible?
        if(g_pCore->GetChat() && !g_pCore->GetChat()->IsInputVisible())
        {
            // Get the key code string
            CString strCode = GetKeyNameByCode((DWORD)wParam);

            // Was something presses?
            if(!strCode.IsEmpty())
            {
                CString strState;

                // Get the key state
                if(uMsg == WM_KEYUP)
                {
                    // Check if key was pressed beforehand
                    if(std::find(pressedKeys.begin(), pressedKeys.end(), strCode) != pressedKeys.end())
                    {
                        pressedKeys.remove(strCode);
                        strState = "up";
                    }
                }
                else if(uMsg == WM_KEYDOWN)
                {
                    // Check if key was pressed beforehand
                    if(std::find(pressedKeys.begin(), pressedKeys.end(), strCode) == pressedKeys.end())
                    {
                        pressedKeys.push_back(strCode);
                        strState = "down";
                    }
                }

                // Is the state valid?
                if(!strState.IsEmpty())
                {
                    /*// Call the script event
                    CSquirrelArguments pArguments;
                    pArguments.push(strCode);
                    pArguments.push(strState);
                    pGame->GetClientScriptingManager()->GetEvents()->Call("onClientKeyPress", &pArguments);
                    */
                }
            }
        }
    }

    return CallWindowProc(m_wWndProc, hWnd, uMsg, wParam, lParam);
}
开发者ID:JeNkStA,项目名称:IVMultiplayer,代码行数:84,代码来源:Input.cpp

示例13: removeInterpolator

void removeInterpolator(shared_ptr<IInterpolator> &interpolator){
	g_interpolators.remove(interpolator);
}
开发者ID:DezerteR,项目名称:Manipulator3D,代码行数:3,代码来源:IInterpolator.cpp

示例14: remove

 void remove(Component* child) {
   list.remove(child);
 }
开发者ID:Chuvi-w,项目名称:cpp,代码行数:3,代码来源:main.cpp

示例15:

		~Renderable( ) {
			renderables.remove( this );
		}
开发者ID:pfirsich,项目名称:LameTD,代码行数:3,代码来源:renderable.hpp


注:本文中的std::list::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。