| 173 | } |
| 174 | |
| 175 | bool CreditSystem::removeCreditReference(Credit credit) { |
| 176 | CreditRecord& record = this->_credits[credit._id]; |
| 177 | // If the Credit is from a previous generation (a deleted credit source), |
| 178 | // ignore it. |
| 179 | if (credit._generation != record.generation) { |
| 180 | return false; |
| 181 | } |
| 182 | |
| 183 | CESIUM_ASSERT(record.referenceCount > 0); |
| 184 | --record.referenceCount; |
| 185 | |
| 186 | return true; |
| 187 | } |
| 188 | |
| 189 | const CreditsSnapshot& |
| 190 | CreditSystem::getSnapshot(CreditFilteringMode filteringMode) noexcept { |