This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Code cleanup: merge two if statements in name-lookup.c (lookup_name_real)
- From: Volker Reichelt <reichelt at igpm dot rwth-aachen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 24 Nov 2005 13:56:05 +0100 (CET)
- Subject: [patch] Code cleanup: merge two if statements in name-lookup.c (lookup_name_real)
The following patch merges two if statements in name-lookup.c
(lookup_name_real).
Bootstrapped and regtested on i686-pc-linux-gnu.
Ok for mainline?
Regards,
Volker
2005-11-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* name-lookup.c (lookup_name_real): Merge two if's.
===================================================================
--- gcc/gcc/cp/name-lookup.c 15 Jun 2005 00:41:25 -0000 1.125
+++ gcc/gcc/cp/name-lookup.c 15 Jun 2005 12:58:57 -0000
@@ -3922,12 +3922,9 @@ lookup_name_real (tree name, int prefer_
if (!val)
val = unqualified_namespace_lookup (name, flags);
- if (val)
- {
- /* If we have a single function from a using decl, pull it out. */
- if (TREE_CODE (val) == OVERLOAD && ! really_overloaded_fn (val))
- val = OVL_FUNCTION (val);
- }
+ /* If we have a single function from a using decl, pull it out. */
+ if (val && TREE_CODE (val) == OVERLOAD && !really_overloaded_fn (val))
+ val = OVL_FUNCTION (val);
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, val);
}
===================================================================