This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gcjx] Patch: FYI: remove useless casts


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,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]