}
int MessageComparator::_compareClockClasses(const bt2::ConstClockClass left,
- const bt2::ConstClockClass right) noexcept
+ const bt2::ConstClockClass right) const noexcept
{
- if (const auto ret = _compareOptUuids(left.uuid(), right.uuid())) {
+ if (_mGraphMipVersion == 0) {
+ if (const auto ret = _compareOptUuids(left.uuid(), right.uuid())) {
+ return ret;
+ }
+ } else if (const auto ret = _compareIdentities(left.identity(), right.identity())) {
return ret;
}
}
int MessageComparator::_compareStreamsSameIds(const bt2::ConstStream left,
- const bt2::ConstStream right) noexcept
+ const bt2::ConstStream right) const noexcept
{
BT_ASSERT_DBG(left.id() == right.id());
}
/* Compare the clock classes associated to the stream classes. */
- return _compareOptionalBorrowedObjects(leftCls.defaultClockClass(),
- rightCls.defaultClockClass(), _compareClockClasses);
+ return _compareOptionalBorrowedObjects(
+ leftCls.defaultClockClass(), rightCls.defaultClockClass(),
+ [this](const bt2::ConstClockClass leftCc, const bt2::ConstClockClass rightCc) {
+ return _compareClockClasses(leftCc, rightCc);
+ });
}
int MessageComparator::_compareClockSnapshots(const bt2::ConstClockSnapshot left,
} /* namespace */
int MessageComparator::_compareMessagesSameType(const bt2::ConstMessage left,
- const bt2::ConstMessage right) noexcept
+ const bt2::ConstMessage right) const noexcept
{
BT_ASSERT_DBG(left.type() == right.type());
const bt2::IdentityView& right) noexcept;
static int _compareEventClasses(const bt2::ConstEventClass left,
const bt2::ConstEventClass right) noexcept;
- static int _compareClockClasses(const bt2::ConstClockClass left,
- const bt2::ConstClockClass right) noexcept;
- static int _compareStreamsSameIds(const bt2::ConstStream left,
- const bt2::ConstStream right) noexcept;
+ int _compareClockClasses(const bt2::ConstClockClass left,
+ const bt2::ConstClockClass right) const noexcept;
+ int _compareStreamsSameIds(const bt2::ConstStream left,
+ const bt2::ConstStream right) const noexcept;
static int _compareClockSnapshots(const bt2::ConstClockSnapshot left,
const bt2::ConstClockSnapshot right) noexcept;
- static int _compareMessagesSameType(const bt2::ConstMessage left,
- const bt2::ConstMessage right) noexcept;
+ int _compareMessagesSameType(const bt2::ConstMessage left,
+ const bt2::ConstMessage right) const noexcept;
static int _compareMessages(const bt2::ConstMessage left,
const bt2::ConstMessage right) noexcept;