Adds safe bool operator to ICmpPtr, replacing the null() method, based on patch by leper. Also changes bool operator in AtSmartPtr to safe bool. Fixes #1077.

Changes some CmpPtr variable names for consistency.

This was SVN commit r11036.
This commit is contained in:
historic_bruno
2012-02-08 02:46:15 +00:00
parent 046729dfa7
commit 08bd07ddd6
45 changed files with 392 additions and 360 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2011 Wildfire Games.
/* Copyright (C) 2012 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -186,7 +186,7 @@ void CUnitAnimation::Update(float time)
if (!m_ActionSound.empty())
{
CmpPtr<ICmpSoundManager> cmpSoundManager(*g_Game->GetSimulation2(), SYSTEM_ENTITY);
if (!cmpSoundManager.null())
if (cmpSoundManager)
cmpSoundManager->PlaySoundGroup(m_ActionSound, m_Entity);
}