mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-22 17:23:05 +00:00
ir: Add equality op to array_type_def::subrange_type::bound_value
* include/abg-ir.h (array_type_def::subrange_type::bound_value::operator==): Declare new ... * src/abg-ir.cc (array_type_def::subrange_type::bound_value::operator==): ... equality operator. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
2cc1ab7ee8
commit
90eff56227
@ -2326,6 +2326,7 @@ public:
|
||||
uint64_t get_unsigned_value();
|
||||
void set_unsigned(uint64_t v);
|
||||
void set_signed(int64_t v);
|
||||
bool operator==(const bound_value&) const;
|
||||
}; //end class bound_value
|
||||
|
||||
/// Hasher for an instance of array::subrange
|
||||
|
@ -14738,6 +14738,17 @@ array_type_def::subrange_type::bound_value::set_signed(int64_t v)
|
||||
v_.signed_ = v;
|
||||
}
|
||||
|
||||
/// Equality operator of the bound value.
|
||||
///
|
||||
/// @param v the other bound value to compare with.
|
||||
///
|
||||
/// @return true iff the current bound value equals @p v.
|
||||
bool
|
||||
array_type_def::subrange_type::bound_value::operator==(const bound_value& v) const
|
||||
{
|
||||
return s_ == v.s_ && v_.unsigned_ == v.v_.unsigned_;
|
||||
}
|
||||
|
||||
// </array_type_def::subrante_type::bound_value>
|
||||
|
||||
struct array_type_def::subrange_type::priv
|
||||
|
Loading…
Reference in New Issue
Block a user