| 1421 | |
| 1422 | |
| 1423 | bool Resources::Resource_::operator==(const Resource_& that) const |
| 1424 | { |
| 1425 | // Both Resource_ objects should have the same sharedness. |
| 1426 | if (isShared() != that.isShared()) { |
| 1427 | return false; |
| 1428 | } |
| 1429 | |
| 1430 | // For shared resources to be equal, the shared counts need to match. |
| 1431 | if (isShared() && (sharedCount.get() != that.sharedCount.get())) { |
| 1432 | return false; |
| 1433 | } |
| 1434 | |
| 1435 | return resource == that.resource; |
| 1436 | } |
| 1437 | |
| 1438 | |
| 1439 | bool Resources::Resource_::operator!=(const Resource_& that) const |