| 1435 | |
| 1436 | |
| 1437 | bool Resources::Resource_::operator==(const Resource_& that) const |
| 1438 | { |
| 1439 | // Both Resource_ objects should have the same sharedness. |
| 1440 | if (isShared() != that.isShared()) { |
| 1441 | return false; |
| 1442 | } |
| 1443 | |
| 1444 | // For shared resources to be equal, the shared counts need to match. |
| 1445 | if (isShared() && (sharedCount.get() != that.sharedCount.get())) { |
| 1446 | return false; |
| 1447 | } |
| 1448 | |
| 1449 | return resource == that.resource; |
| 1450 | } |
| 1451 | |
| 1452 | |
| 1453 | bool Resources::Resource_::operator!=(const Resource_& that) const |