Ref T565, "canTalk" utility functions

This commit is contained in:
Klaus Basan
2019-03-13 17:23:34 +01:00
committed by Mat Sutcliffe
parent a049ee7025
commit 5ac1f65756
4 changed files with 29 additions and 8 deletions

View File

@@ -23,6 +23,16 @@ namespace BlackMisc
CSequence(other)
{ }
int CVoiceRoomList::countCanTalkTo() const
{
int c = 0;
for (const CVoiceRoom &r : *this)
{
if (r.canTalkTo()) { c++; }
}
return c;
}
const CVoiceRoomList &CVoiceRoomList::twoEmptyRooms()
{
static CVoiceRoomList emptyRooms;