Skip to content

Commit 568aad1

Browse files
committed
use actual enums for JNI defines
1 parent 2d04d3c commit 568aad1

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

include/jni/types.hpp

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,19 @@ namespace jni
7979
R (*fnPtr)(JNIEnv*, jobject*, Args...);
8080
};
8181

82-
enum class version : jint {};
83-
84-
const version jni_version_1_1 = version(JNI_VERSION_1_1);
85-
const version jni_version_1_2 = version(JNI_VERSION_1_2);
86-
const version jni_version_1_4 = version(JNI_VERSION_1_4);
87-
const version jni_version_1_6 = version(JNI_VERSION_1_6);
88-
89-
enum class error : jint {};
82+
enum version : jint
83+
{
84+
jni_version_1_1 = version(JNI_VERSION_1_1),
85+
jni_version_1_2 = version(JNI_VERSION_1_2),
86+
jni_version_1_4 = version(JNI_VERSION_1_4),
87+
jni_version_1_6 = version(JNI_VERSION_1_6),
88+
};
9089

91-
const error jni_ok = error(JNI_OK);
92-
const error jni_err = error(JNI_ERR);
93-
const error jni_edetached = error(JNI_EDETACHED);
94-
const error jni_eversion = error(JNI_EVERSION);
90+
enum error : jint
91+
{
92+
jni_ok = error(JNI_OK),
93+
jni_err = error(JNI_ERR),
94+
jni_edetached = error(JNI_EDETACHED),
95+
jni_eversion = error(JNI_EVERSION),
96+
};
9597
}

0 commit comments

Comments
 (0)