[gcjx] Patch: FYI: remove useless casts

Tom Tromey tromey@redhat.com
Fri Jan 14 17:23:00 GMT 2005


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,



More information about the Java-patches mailing list