MikeHart
Administrator
- Joined
- Jun 19, 2017
- Messages
- 3,597
By @grant on GH issues:
Why are the native libraries included in the Android target used instead of Java? They seem to only contain two small methods for parsing numbers from strings. It would be nice to see it be pure Java on Android, so it'll be compatible with any possible processor architecture that comes out in the future
cerberusxdev/cerberus
Cerberus X - A cross platform game programming language. - cerberusxdev/cerberusgithub.com
LangUtil.javaReplacing the two native methods with Java's build in Integer.parseInt() and Float.parseFloat() doesn't seem to cause any problems with my test project. Rendering numbers in text worked. I don't understand why the native code exists.
Code:
package com.cerberus;
public class LangUtil{
public static int parseInt( String str ) {
return Integer.parseInt(str);
}
public static float parseFloat( String str ) {
return Float.parseFloat(str);
}
}