Index: webrtc/modules/utility/source/helpers_android.cc |
diff --git a/webrtc/modules/utility/source/helpers_android.cc b/webrtc/modules/utility/source/helpers_android.cc |
index aea35f8d5a254b34c89bfa855f8129f932ab1847..c19984cb832172b61a30dda8d42d2c72026e59d9 100644 |
--- a/webrtc/modules/utility/source/helpers_android.cc |
+++ b/webrtc/modules/utility/source/helpers_android.cc |
@@ -23,10 +23,10 @@ |
namespace webrtc { |
JNIEnv* GetEnv(JavaVM* jvm) { |
- void* env = NULL; |
+ void* env = nullptr; |
jint status = jvm->GetEnv(&env, JNI_VERSION_1_6); |
- RTC_CHECK(((env != NULL) && (status == JNI_OK)) || |
- ((env == NULL) && (status == JNI_EDETACHED))) |
+ RTC_CHECK(((env != nullptr) && (status == JNI_OK)) || |
+ ((env == nullptr) && (status == JNI_EDETACHED))) |
<< "Unexpected GetEnv return: " << status << ":" << env; |
return reinterpret_cast<JNIEnv*>(env); |
} |
@@ -83,7 +83,7 @@ void DeleteGlobalRef(JNIEnv* jni, jobject o) { |
} |
std::string GetThreadId() { |
- char buf[21]; // Big enough to hold a kuint64max plus terminating NULL. |
+ char buf[21]; // Big enough to hold a kuint64max plus terminating nullptr. |
int thread_id = gettid(); |
RTC_CHECK_LT(snprintf(buf, sizeof(buf), "%i", thread_id), |
static_cast<int>(sizeof(buf))) |
@@ -96,14 +96,14 @@ std::string GetThreadInfo() { |
} |
AttachThreadScoped::AttachThreadScoped(JavaVM* jvm) |
- : attached_(false), jvm_(jvm), env_(NULL) { |
+ : attached_(false), jvm_(jvm), env_(nullptr) { |
env_ = GetEnv(jvm); |
if (!env_) { |
// Adding debug log here so we can track down potential leaks and figure |
// out why we sometimes see "Native thread exiting without having called |
// DetachCurrentThread" in logcat outputs. |
ALOGD("Attaching thread to JVM%s", GetThreadInfo().c_str()); |
- jint res = jvm->AttachCurrentThread(&env_, NULL); |
+ jint res = jvm->AttachCurrentThread(&env_, nullptr); |
attached_ = (res == JNI_OK); |
RTC_CHECK(attached_) << "AttachCurrentThread failed: " << res; |
} |