libcore: Clean up Enum.compareTo(E)

As E extends Enum<E>, it is safe to cast the comparable object to
Enum<?> as it should not throw any exceptions. When it is cast, the
ordinal value can be accessed directly. Doing so would be preferred as
either both the variables this.ordinal and o.ordinal should be used or
the methods this.ordinal() and o.ordinal() should be used without
mixing them together.

Change-Id: I7c4e93fdf35b0bf2949738a91c0855d9a52e5c13
diff --git a/libart/src/main/java/java/lang/Enum.java b/libart/src/main/java/java/lang/Enum.java
index e9545a1..ac5fc9a 100644
--- a/libart/src/main/java/java/lang/Enum.java
+++ b/libart/src/main/java/java/lang/Enum.java
@@ -149,7 +149,7 @@
      * @see java.lang.Comparable
      */
     public final int compareTo(E o) {
-        return ordinal - o.ordinal();
+        return ordinal - ((Enum<?>) o).ordinal;
     }
 
     /**