diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:18:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:29 +0100 |
commit | 81da71b64098e3f0d5ebe61d0c94c73e316c21b3 (patch) | |
tree | 29ceb2cac30ccdcf57bdabd9627e9ad85e5e0b00 /jvmaccess/source/classpath.cxx | |
parent | 6794c2e44ede0da2772883fa53a7c935a2bae586 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I226aeb4787a4c30e17fb54dc7775a288aa09b760
Diffstat (limited to 'jvmaccess/source/classpath.cxx')
-rw-r--r-- | jvmaccess/source/classpath.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/jvmaccess/source/classpath.cxx b/jvmaccess/source/classpath.cxx index abde60f81478..3f0a3e3c2c2a 100644 --- a/jvmaccess/source/classpath.cxx +++ b/jvmaccess/source/classpath.cxx @@ -43,15 +43,15 @@ jobjectArray jvmaccess::ClassPath::translateToUrls( JNIEnv * environment, OUString const & classPath) { assert(context.is()); - assert(environment != 0); + assert(environment != nullptr); jclass classUrl(environment->FindClass("java/net/URL")); - if (classUrl == 0) { - return 0; + if (classUrl == nullptr) { + return nullptr; } jmethodID ctorUrl( environment->GetMethodID(classUrl, "<init>", "(Ljava/lang/String;)V")); - if (ctorUrl == 0) { - return 0; + if (ctorUrl == nullptr) { + return nullptr; } ::std::vector< jobject > urls; for (::sal_Int32 i = 0; i != -1;) { @@ -76,22 +76,22 @@ jobjectArray jvmaccess::ClassPath::translateToUrls( arg.l = environment->NewString( static_cast< jchar const * >(url.getStr()), static_cast< jsize >(url.getLength())); - if (arg.l == 0) { - return 0; + if (arg.l == nullptr) { + return nullptr; } jobject o(environment->NewObjectA(classUrl, ctorUrl, &arg)); - if (o == 0) { - return 0; + if (o == nullptr) { + return nullptr; } urls.push_back(o); } } jobjectArray result = environment->NewObjectArray( - static_cast< jsize >(urls.size()), classUrl, 0); + static_cast< jsize >(urls.size()), classUrl, nullptr); // static_cast is ok, as each element of urls occupied at least one // character of the OUString classPath - if (result == 0) { - return 0; + if (result == nullptr) { + return nullptr; } jsize idx = 0; for (std::vector< jobject >::iterator i(urls.begin()); i != urls.end(); ++i) |