From 1fed1282ad338fc92c9608b8bd6f97e969f64120 Mon Sep 17 00:00:00 2001 From: fyrz Date: Thu, 18 Dec 2014 22:27:50 +0100 Subject: [PATCH] [RocksJava] Incorporated changes D30081 --- java/rocksjni/slice.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/rocksjni/slice.cc b/java/rocksjni/slice.cc index 6b7ab0ba5..c92ca5ec6 100644 --- a/java/rocksjni/slice.cc +++ b/java/rocksjni/slice.cc @@ -229,7 +229,7 @@ jobject Java_org_rocksdb_DirectSlice_data0( jbyte Java_org_rocksdb_DirectSlice_get0( JNIEnv* env, jobject jobj, jlong handle, jint offset) { const auto* slice = reinterpret_cast(handle); - return (slice)[offset]; + return (*slice)[offset]; } /* @@ -239,7 +239,7 @@ jbyte Java_org_rocksdb_DirectSlice_get0( */ void Java_org_rocksdb_DirectSlice_clear0( JNIEnv* env, jobject jobj, jlong handle) { - const auto* slice = reinterpret_cast(handle); + auto* slice = reinterpret_cast(handle); delete [] slice->data_; slice->clear(); } @@ -251,7 +251,7 @@ void Java_org_rocksdb_DirectSlice_clear0( */ void Java_org_rocksdb_DirectSlice_removePrefix0( JNIEnv* env, jobject jobj, jlong handle, jint length) { - const auto* slice = reinterpret_cast(handle); + auto* slice = reinterpret_cast(handle); slice->remove_prefix(length); }