MCPcopy Create free account
hub / github.com/bwapi/bwapi / IsAllyImpl

Function IsAllyImpl

bwapi/BWAPILIB/Source/Filters.cpp:188–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186 const PtrUnitFilter IsEnemy( &IsEnemyImpl );
187
188 bool IsAllyImpl(Unit u)
189 {
190 if ( BWAPI::BroodwarPtr == nullptr )
191 return false;
192 BWAPI::Player self = BWAPI::Broodwar->self();
193 return self == nullptr ? false : self->isAlly( u->getPlayer() );
194 }
195 const PtrUnitFilter IsAlly( &IsAllyImpl );
196
197 U_UFILTER(IsOwned, BWAPI::BroodwarPtr == nullptr ? false : u->getPlayer() == BWAPI::Broodwar->self() );

Callers

nothing calls this directly

Calls 3

selfMethod · 0.45
isAllyMethod · 0.45
getPlayerMethod · 0.45

Tested by

no test coverage detected