aboutsummaryrefslogtreecommitdiffstats
path: root/native/jni/src
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-08-28 03:18:48 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-28 03:18:48 +0000
commit07315f94736fc34678e9ce41a44c1446e2436d3b (patch)
tree5c9f807746a0f9af2bb30695def4e16c1e9351a7 /native/jni/src
parentb85349e981e446610e8ece22d3b6a74a2f31be53 (diff)
parente394a0c6ff96edc8f8c949f0851a26922983f288 (diff)
downloadlatinime-07315f94736fc34678e9ce41a44c1446e2436d3b.tar.gz
latinime-07315f94736fc34678e9ce41a44c1446e2436d3b.tar.xz
latinime-07315f94736fc34678e9ce41a44c1446e2436d3b.zip
Merge "Implement IntArrayView::skip()."
Diffstat (limited to 'native/jni/src')
-rw-r--r--native/jni/src/utils/int_array_view.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/native/jni/src/utils/int_array_view.h b/native/jni/src/utils/int_array_view.h
index 8797b5944..c9c3b21d4 100644
--- a/native/jni/src/utils/int_array_view.h
+++ b/native/jni/src/utils/int_array_view.h
@@ -96,6 +96,13 @@ class IntArrayView {
return IntArrayView(mPtr, std::min(maxSize, mSize));
}
+ const IntArrayView skip(const size_t n) const {
+ if (mSize <= n) {
+ return IntArrayView();
+ }
+ return IntArrayView(mPtr + n, mSize - n);
+ }
+
private:
DISALLOW_ASSIGNMENT_OPERATOR(IntArrayView);