diff options
author | 2012-07-30 16:27:44 +0900 | |
---|---|---|
committer | 2012-07-30 16:27:44 +0900 | |
commit | 5460ea389d83722ac98abaef8a2bb9900fb571e7 (patch) | |
tree | 6a1f33b3f41e00ee2b658ebe024a0eb0067ddcc3 /native/jni/jni_common.cpp | |
parent | efd8b838ee9415ba4ed692ecf136a918cfa02c54 (diff) | |
download | latinime-5460ea389d83722ac98abaef8a2bb9900fb571e7.tar.gz latinime-5460ea389d83722ac98abaef8a2bb9900fb571e7.tar.xz latinime-5460ea389d83722ac98abaef8a2bb9900fb571e7.zip |
Misc cleanups
Change-Id: I28308f12c3064299acefc346b72279036c3726a7
Diffstat (limited to 'native/jni/jni_common.cpp')
-rw-r--r-- | native/jni/jni_common.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/native/jni/jni_common.cpp b/native/jni/jni_common.cpp index 8d7bce79e..4eeda1d4e 100644 --- a/native/jni/jni_common.cpp +++ b/native/jni/jni_common.cpp @@ -1,6 +1,5 @@ /* - * - * Copyright 2011, The Android Open Source Project + * Copyright (C) 2011, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -37,11 +36,11 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { JNIEnv *env = 0; jint result = -1; - if (vm->GetEnv((void**) &env, JNI_VERSION_1_4) != JNI_OK) { + if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) { AKLOGE("ERROR: GetEnv failed"); goto bail; } - assert(env != 0); + assert(env); if (!register_BinaryDictionary(env)) { AKLOGE("ERROR: BinaryDictionary native registration failed"); @@ -59,7 +58,7 @@ jint JNI_OnLoad(JavaVM *vm, void *reserved) { } /* success -- return valid version number */ - result = JNI_VERSION_1_4; + result = JNI_VERSION_1_6; bail: return result; @@ -70,7 +69,7 @@ namespace latinime { int registerNativeMethods(JNIEnv *env, const char *className, JNINativeMethod *methods, int numMethods) { jclass clazz = env->FindClass(className); - if (clazz == 0) { + if (!clazz) { AKLOGE("Native registration unable to find class '%s'", className); return JNI_FALSE; } |