From ce22ea99a0487bec176e491b1d7178871038fa72 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Tue, 1 Nov 2016 09:55:29 -0700 Subject: [PATCH] Fix casts for MSVC Summary: I am not sure if this is the best way to fix this? Closes https://github.com/facebook/rocksdb/pull/1452 Differential Revision: D4109338 Pulled By: yiwu-arbug fbshipit-source-id: ca40809 --- java/rocksjni/options.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/rocksjni/options.cc b/java/rocksjni/options.cc index 67f7db05a..e245a2c79 100644 --- a/java/rocksjni/options.cc +++ b/java/rocksjni/options.cc @@ -2136,7 +2136,7 @@ jintArray Java_org_rocksdb_Options_maxBytesForLevelMultiplierAdditional( jint* additionals = new jint[size]; for (size_t i = 0; i < size; i++) { - additionals[i] = reinterpret_cast(mbflma[i]); + additionals[i] = static_cast(mbflma[i]); } jsize jlen = static_cast(size); @@ -2162,7 +2162,7 @@ void Java_org_rocksdb_Options_setMaxBytesForLevelMultiplierAdditional( auto* opt = reinterpret_cast(jhandle); opt->max_bytes_for_level_multiplier_additional.clear(); for (jsize i = 0; i < len; i++) { - opt->max_bytes_for_level_multiplier_additional.push_back(reinterpret_cast(additionals[i])); + opt->max_bytes_for_level_multiplier_additional.push_back(static_cast(additionals[i])); } } @@ -3398,7 +3398,7 @@ jintArray Java_org_rocksdb_ColumnFamilyOptions_maxBytesForLevelMultiplierAdditio jint* additionals = new jint[size]; for (size_t i = 0; i < size; i++) { - additionals[i] = reinterpret_cast(mbflma[i]); + additionals[i] = static_cast(mbflma[i]); } jsize jlen = static_cast(size); @@ -3425,7 +3425,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setMaxBytesForLevelMultiplierAdditiona auto* cf_opt = reinterpret_cast(jhandle); cf_opt->max_bytes_for_level_multiplier_additional.clear(); for (jsize i = 0; i < len; i++) { - cf_opt->max_bytes_for_level_multiplier_additional.push_back(reinterpret_cast(additionals[i])); + cf_opt->max_bytes_for_level_multiplier_additional.push_back(static_cast(additionals[i])); } }