| 159 | } |
| 160 | |
| 161 | bool CreditSystem::addCreditReference(Credit credit) { |
| 162 | CreditRecord& record = this->_credits[credit._id]; |
| 163 | |
| 164 | // If the Credit is from a previous generation (a deleted credit source), |
| 165 | // ignore it. |
| 166 | if (credit._generation != record.generation) { |
| 167 | return false; |
| 168 | } |
| 169 | |
| 170 | ++record.referenceCount; |
| 171 | |
| 172 | return true; |
| 173 | } |
| 174 | |
| 175 | bool CreditSystem::removeCreditReference(Credit credit) { |
| 176 | CreditRecord& record = this->_credits[credit._id]; |
no outgoing calls
no test coverage detected