?? squirmcellslot.cpp
字號:
// SquirmCellSlot.cpp
#include "stdafx.h"
#include "SquirmCellSlot.h"
#include "SquirmError.h"
void SquirmCellSlot::addOccupant(SquirmCell *occ)
{
// mustn't already be in this slot (slow check)
#ifdef _DEBUG
if(this->occupants.Find(occ)!=NULL)
{
SquirmError("SquirmCellSlot::addOccupant : already present!");
return;
}
#endif
this->occupants.AddTail(occ);
}
void SquirmCellSlot::removeOccupant(SquirmCell* occ)
{
// must already be in this slot
POSITION where = this->occupants.Find(occ);
// this check isn't at all slow but should never be needed
#ifdef _DEBUG
if(where==NULL)
{
SquirmError("SquirmCellSlot::removeOccupant : not present!");
return;
}
#endif
this->occupants.RemoveAt(where);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -