Fix formatting.
GitOrigin-RevId: 4c44f261be6bddbce9b24ce28d177313753b603d
This commit is contained in:
parent
dbe358fb66
commit
620e5d95cd
@ -153,6 +153,6 @@ static jint register_native(JavaVM *vm) {
|
||||
} // namespace td_jni
|
||||
|
||||
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) {
|
||||
static jint jni_version = td_jni::register_native(vm); // call_once
|
||||
static jint jni_version = td_jni::register_native(vm); // call_once
|
||||
return jni_version;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ void register_native_method(JNIEnv *env, jclass clazz, std::string name, std::st
|
||||
std::unique_ptr<JNIEnv, JvmThreadDetacher> get_jni_env(JavaVM *java_vm, jint jni_version) {
|
||||
JNIEnv *env = nullptr;
|
||||
if (java_vm->GetEnv(reinterpret_cast<void **>(&env), jni_version) == JNI_EDETACHED) {
|
||||
#ifdef JDK1_2 // if not Android JNI
|
||||
#ifdef JDK1_2 // if not Android JNI
|
||||
auto p_env = reinterpret_cast<void **>(&env);
|
||||
#else
|
||||
auto p_env = &env;
|
||||
|
@ -50,12 +50,12 @@ class JvmThreadDetacher {
|
||||
}
|
||||
|
||||
public:
|
||||
explicit JvmThreadDetacher(JavaVM *java_vm): java_vm_(java_vm) {
|
||||
explicit JvmThreadDetacher(JavaVM *java_vm) : java_vm_(java_vm) {
|
||||
}
|
||||
|
||||
JvmThreadDetacher(const JvmThreadDetacher &other) = delete;
|
||||
JvmThreadDetacher &operator=(const JvmThreadDetacher &other) = delete;
|
||||
JvmThreadDetacher(JvmThreadDetacher &&other): java_vm_(other.java_vm_) {
|
||||
JvmThreadDetacher(JvmThreadDetacher &&other) : java_vm_(other.java_vm_) {
|
||||
other.java_vm_ = nullptr;
|
||||
}
|
||||
JvmThreadDetacher &operator=(JvmThreadDetacher &&other) = delete;
|
||||
|
@ -94,7 +94,6 @@ class ActorInfo
|
||||
vector<Event> mailbox_;
|
||||
|
||||
bool is_lite() const;
|
||||
bool can_flush_mailbox() const;
|
||||
|
||||
void set_wait_generation(uint32 wait_generation);
|
||||
bool must_wait(uint32 wait_generation) const;
|
||||
|
Loading…
Reference in New Issue
Block a user