Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: base/android/jni_array.cc

Issue 1424363003: Remove two unncessary lines from jni_array.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/android/jni_array.h" 5 #include "base/android/jni_array.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 void JavaArrayOfIntArrayToIntVector( 238 void JavaArrayOfIntArrayToIntVector(
239 JNIEnv* env, 239 JNIEnv* env,
240 jobjectArray array, 240 jobjectArray array,
241 std::vector<std::vector<int>>* out) { 241 std::vector<std::vector<int>>* out) {
242 DCHECK(out); 242 DCHECK(out);
243 size_t len = SafeGetArrayLength(env, array); 243 size_t len = SafeGetArrayLength(env, array);
244 out->resize(len); 244 out->resize(len);
245 for (size_t i = 0; i < len; ++i) { 245 for (size_t i = 0; i < len; ++i) {
246 ScopedJavaLocalRef<jintArray> int_array( 246 ScopedJavaLocalRef<jintArray> int_array(
247 env, static_cast<jintArray>(env->GetObjectArrayElement(array, i))); 247 env, static_cast<jintArray>(env->GetObjectArrayElement(array, i)));
248 jint* ints = env->GetIntArrayElements(int_array.obj(), nullptr);
249 JavaIntArrayToIntVector(env, int_array.obj(), &((*out)[i])); 248 JavaIntArrayToIntVector(env, int_array.obj(), &((*out)[i]));
250 env->ReleaseIntArrayElements(int_array.obj(), ints, JNI_ABORT);
251 } 249 }
252 } 250 }
253 251
254 } // namespace android 252 } // namespace android
255 } // namespace base 253 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698