Exemplo n.º 1
0
Result
BackCert::GetConstrainedNames(/*out*/ const CERTGeneralName** result)
{
  if (!constrainedNames) {
    if (!GetArena()) {
      return FatalError;
    }

    constrainedNames =
      CERT_GetConstrainedCertificateNames(GetNSSCert(), arena.get(),
                                          includeCN == IncludeCN::Yes);
    if (!constrainedNames) {
      return MapSECStatus(SECFailure);
    }
  }

  *result = constrainedNames;
  return Success;
}
Exemplo n.º 2
0
}

bool Battle::Cell::isPassable1(bool check_troop) const
{
    return 0 == object && (!check_troop || NULL == troop);
}

void Battle::Cell::ResetQuality(void)
{
    quality = 0;
}

void Battle::Cell::ResetDirection(void)
{
    direction = UNKNOWN;
}

StreamBase & Battle::operator<< (StreamBase & msg, const Cell & c)
{
    return msg << c.index << c.object << c.direction << c.quality <<
	(c.troop ? c.troop->GetUID() : static_cast<u32>(0));
}

StreamBase & Battle::operator>> (StreamBase & msg, Cell & c)
{
    u32 uid = 0;
    msg >> c.index >> c.object >> c.direction >> c.quality >> uid;
    c.troop = GetArena()->GetTroopUID(uid);
    return msg;
}