/** If a challenge is supported by this binary (i.e. has an appropriate * challenge version number), add this challenge to the set of all challenges, * otherwise free the memory for this challenge. * \param c The challenge that is either stored or freed. */ void UnlockManager::addOrFreeChallenge(ChallengeData *c) { if(isSupportedVersion(*c)) m_all_challenges[c->getId()]=c; else { printf("[challenge] Challenge '%s' is not supported - ignored.\n", c->getId().c_str()); delete c; } } // addOrFreeChallenge
/** If a challenge is supported by this binary (i.e. has an appropriate * challenge version number), add this challenge to the set of all challenges, * otherwise free the memory for this challenge. * \param c The challenge that is either stored or freed. */ void UnlockManager::addOrFreeChallenge(ChallengeData *c) { if(isSupportedVersion(*c)) m_all_challenges[c->getId()]=c; else { Log::warn("Challenge", "Challenge '%s' is not supported - ignored.", c->getId().c_str()); delete c; } } // addOrFreeChallenge