mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-18 07:54:36 +00:00
Cleanup some IR type comparison operators
* include/abg-ir.h (operator==): In the overloads for type_decl, enum and class_decl, turn the shared_ptr parameter into a const reference to the shared_ptr. * src/abg-ir.cc (operator==): Do the same in the definitions. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
da4aaf467a
commit
38e17e0e07
@ -1326,7 +1326,7 @@ bool
|
||||
equals(const scope_type_decl&, const scope_type_decl&, change_kind*);
|
||||
|
||||
bool
|
||||
operator==(type_decl_sptr, type_decl_sptr);
|
||||
operator==(const type_decl_sptr&, const type_decl_sptr&);
|
||||
|
||||
/// A type that introduces a scope.
|
||||
class scope_type_decl : public scope_decl, public virtual type_base
|
||||
@ -1761,7 +1761,7 @@ public:
|
||||
}; // end class enum_type_decl
|
||||
|
||||
bool
|
||||
operator==(enum_type_decl_sptr l, enum_type_decl_sptr r);
|
||||
operator==(const enum_type_decl_sptr& l, const enum_type_decl_sptr& r);
|
||||
/// The abstraction of an enumerator
|
||||
class enum_type_decl::enumerator
|
||||
{
|
||||
@ -2939,7 +2939,7 @@ std::ostream&
|
||||
operator<<(std::ostream&, access_specifier);
|
||||
|
||||
bool
|
||||
operator==(class_decl_sptr l, class_decl_sptr r);
|
||||
operator==(const class_decl_sptr& l, const class_decl_sptr& r);
|
||||
|
||||
/// The base class for member types, data members and member
|
||||
/// functions. Its purpose is mainly to carry the access specifier
|
||||
|
@ -5985,7 +5985,7 @@ type_decl::operator==(const type_decl& o) const
|
||||
///
|
||||
/// @return true iff @p l equals @p r.
|
||||
bool
|
||||
operator==(type_decl_sptr l, type_decl_sptr r)
|
||||
operator==(const type_decl_sptr& l, const type_decl_sptr& r)
|
||||
{
|
||||
if (!!l != !!r)
|
||||
return false;
|
||||
@ -7452,7 +7452,7 @@ enum_type_decl::operator==(const type_base& o) const
|
||||
///
|
||||
/// @return true iff @p l equals @p r.
|
||||
bool
|
||||
operator==(enum_type_decl_sptr l, enum_type_decl_sptr r)
|
||||
operator==(const enum_type_decl_sptr& l, const enum_type_decl_sptr& r)
|
||||
{
|
||||
if (!!l != !!r)
|
||||
return false;
|
||||
@ -10919,7 +10919,7 @@ class_decl::operator==(const class_decl& other) const
|
||||
/// @return true if the class_decl pointed to by the shared_ptrs are
|
||||
/// equal, false otherwise.
|
||||
bool
|
||||
operator==(class_decl_sptr l, class_decl_sptr r)
|
||||
operator==(const class_decl_sptr& l, const class_decl_sptr& r)
|
||||
{
|
||||
if (l.get() == r.get())
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user