void Tank::AdjustHP(int amount){ hp+=amount; if(hp<=0){ DestroyParts(); this->MarkForDestroy(); } }
CString& COXUNC::Full() { BuildMain(); // ... We pass a reference so the user may change the string DestroyParts(); return m_sUNC; }
COXUNC::COXUNC(LPCTSTR pszUNC /* = NULL */, BOOL bURLPart /* = FALSE */) { m_sUNC = pszUNC; m_bURLPart = bURLPart; m_nLastError = ERROR_SUCCESS; // ... Use the one and only standard actor m_pActor = &COXUNCStandardActor::m_theOneAndOnly; ASSERT_VALID(m_pActor); SetMainBuilt(); DestroyParts(); }