mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpimath] Split WPIMathJNI into logical chunks (#5552)
This makes things easier to find, and speeds up compilation.
This commit is contained in:
@@ -31,7 +31,6 @@ void JNI_UnloadTypes(JNIEnv* env);
|
||||
//
|
||||
|
||||
// Used for callback.
|
||||
static JavaVM* jvm = nullptr;
|
||||
static JClass booleanCls;
|
||||
static JClass connectionInfoCls;
|
||||
static JClass doubleCls;
|
||||
@@ -72,8 +71,6 @@ static const JExceptionInit exceptions[] = {
|
||||
extern "C" {
|
||||
|
||||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
|
||||
jvm = vm;
|
||||
|
||||
JNIEnv* env;
|
||||
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
|
||||
return JNI_ERR;
|
||||
@@ -114,7 +111,6 @@ JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved) {
|
||||
c.cls->free(env);
|
||||
}
|
||||
nt::JNI_UnloadTypes(env);
|
||||
jvm = nullptr;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user