Add and use an _Init() method for BarTeamInfo
This commit is contained in:
@@ -960,8 +960,7 @@ BarTeamInfo::BarTeamInfo(BList* teams, uint32 flags, char* sig, BBitmap* icon,
|
||||
icon(icon),
|
||||
name(name)
|
||||
{
|
||||
for (int32 i = 0; i < kIconCacheCount; i++)
|
||||
iconCache[i] = NULL;
|
||||
_Init();
|
||||
}
|
||||
|
||||
|
||||
@@ -972,8 +971,7 @@ BarTeamInfo::BarTeamInfo(const BarTeamInfo &info)
|
||||
icon(new BBitmap(*info.icon)),
|
||||
name(strdup(info.name))
|
||||
{
|
||||
for (int32 i = 0; i < kIconCacheCount; i++)
|
||||
iconCache[i] = NULL;
|
||||
_Init();
|
||||
}
|
||||
|
||||
|
||||
@@ -985,3 +983,11 @@ BarTeamInfo::~BarTeamInfo()
|
||||
for (int32 i = 0; i < kIconCacheCount; i++)
|
||||
delete iconCache[i];
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BarTeamInfo::_Init()
|
||||
{
|
||||
for (int32 i = 0; i < kIconCacheCount; i++)
|
||||
iconCache[i] = NULL;
|
||||
}
|
||||
|
||||
@@ -93,6 +93,10 @@ public:
|
||||
BarTeamInfo(const BarTeamInfo &info);
|
||||
~BarTeamInfo();
|
||||
|
||||
private:
|
||||
void _Init();
|
||||
|
||||
public:
|
||||
BList* teams;
|
||||
uint32 flags;
|
||||
char* sig;
|
||||
|
||||
Reference in New Issue
Block a user