Best way for associating Weapon and Ammo?

bool Compatible = *(Weapon->AmmoPrimary) == Ammo->GetClass();