Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions iocore/hostdb/P_RefCountCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ class RefCountCacheHeader
ts::VersionNumber object_version; // version passed in of whatever it is we are caching

RefCountCacheHeader(ts::VersionNumber object_version = ts::VersionNumber());
bool operator==(const RefCountCacheHeader other) const;
bool compatible(RefCountCacheHeader *other) const;
bool operator==(RefCountCacheHeader const &that) const;
bool compatible(RefCountCacheHeader *that) const;
};

// RefCountCache is a ref-counted key->value map to store classes that inherit from RefCountObj.
Expand Down
9 changes: 4 additions & 5 deletions iocore/hostdb/RefCountCache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ RefCountCacheHashEntry::dealloc(RefCountCacheHashEntry *e)
RefCountCacheHeader::RefCountCacheHeader(ts::VersionNumber object_version) : object_version(object_version){};

bool
RefCountCacheHeader::operator==(const RefCountCacheHeader other) const
RefCountCacheHeader::operator==(RefCountCacheHeader const &that) const
{
return this->magic == other.magic && this->version == other.version;
return this->magic == that.magic && this->version == that.version;
}

bool
RefCountCacheHeader::compatible(RefCountCacheHeader *other) const
RefCountCacheHeader::compatible(RefCountCacheHeader *that) const
{
return (this->magic == other->magic && this->version._major == other->version._major &&
this->object_version._major == other->version._major);
return this->magic == that->magic && this->version == that->version && this->object_version == that->version;
};