From 7ea7d7c4a92fac1dbcd70bb8bef983a19b104e0a Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 8 Nov 2016 12:31:03 +0100 Subject: [PATCH] Misc style cleanups in abg-ir.cc * src/abg-ir.cc (equals): In overloads for function_type and class_decl, avoid returning a constant when we can return a variable like in the rest of the code. Signed-off-by: Dodji Seketeli --- src/abg-ir.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/abg-ir.cc b/src/abg-ir.cc index 4be3fef6..8b6c4cea 100644 --- a/src/abg-ir.cc +++ b/src/abg-ir.cc @@ -10885,7 +10885,7 @@ equals(const function_type& lhs, if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } class_decl* lhs_class = 0, *rhs_class = 0; @@ -10903,7 +10903,7 @@ equals(const function_type& lhs, if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } else if (lhs_class && (lhs_class->get_qualified_name() @@ -10913,7 +10913,7 @@ equals(const function_type& lhs, if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } // Then compare the return type; Beware if it's t's a class type @@ -10945,7 +10945,7 @@ equals(const function_type& lhs, if (k) *k |= SUBTYPE_CHANGE_KIND; else - RETURN(false); + RETURN(result); } } else @@ -10955,7 +10955,7 @@ equals(const function_type& lhs, if (k) *k |= SUBTYPE_CHANGE_KIND; else - RETURN(false); + RETURN(result); } class_decl* lcl = 0, * rcl = 0; @@ -10982,7 +10982,7 @@ equals(const function_type& lhs, if (k) *k |= SUBTYPE_CHANGE_KIND; else - RETURN(false); + RETURN(result); } } @@ -10993,7 +10993,7 @@ equals(const function_type& lhs, if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } RETURN(result); @@ -13707,7 +13707,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } for (class_decl::base_specs::const_iterator @@ -13737,7 +13737,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } for (class_decl::data_members::const_iterator @@ -13755,7 +13755,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) break; } else - RETURN(false); + RETURN(result); } } @@ -13773,7 +13773,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } for (class_decl::member_function_templates::const_iterator @@ -13791,7 +13791,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) break; } else - RETURN(false); + RETURN(result); } } @@ -13804,7 +13804,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) if (k) *k |= LOCAL_CHANGE_KIND; else - RETURN(false); + RETURN(result); } for (class_decl::member_class_templates::const_iterator @@ -13822,7 +13822,7 @@ equals(const class_decl& l, const class_decl& r, change_kind* k) break; } else - RETURN(false); + RETURN(result); } }