This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: remove useless casts
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 14 Jan 2005 10:18:49 -0700
- Subject: [gcjx] Patch: FYI: remove useless casts
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
Class caches always return classes, so these casts are unneeded.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* bytecode/generate.cc (visit_for_enhanced): Removed unnecessary
casts.
Index: bytecode/generate.cc
===================================================================
RCS file: /cvs/gcc/gcc/gcjx/bytecode/Attic/generate.cc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 generate.cc
--- bytecode/generate.cc 13 Jan 2005 03:18:34 -0000 1.1.2.1
+++ bytecode/generate.cc 14 Jan 2005 17:20:50 -0000
@@ -730,11 +730,11 @@
else
{
model_class *iterator_type
- = assert_cast<model_class *> (global->get_compiler ()->java_util_Iterator ());
+ = global->get_compiler ()->java_util_Iterator ();
model_class *object_type
- = assert_cast<model_class *> (global->get_compiler ()->java_lang_Object ());
+ = global->get_compiler ()->java_lang_Object ();
model_class *iterable_type
- = assert_cast<model_class *> (global->get_compiler ()->java_lang_Iterable ());
+ = global->get_compiler ()->java_lang_Iterable ();
model_method *iter_meth
= find_method ("iterator", iterable_type, NULL,