geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [3/3] geode-native git commit: GEODE-2440: Remove unneeded static_casts.
Date Thu, 23 Feb 2017 20:36:03 GMT
GEODE-2440: Remove unneeded static_casts.

This closes #28.


Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/a6057ec0
Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/a6057ec0
Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/a6057ec0

Branch: refs/heads/develop
Commit: a6057ec0d319775d55cc0c380dccafa2b4dd9ded
Parents: 6cfb768
Author: Mike Martell <mmartell@pivotal.io>
Authored: Wed Feb 22 23:28:31 2017 -0800
Committer: Jacob Barrett <jbarrett@pivotal.io>
Committed: Thu Feb 23 12:35:33 2017 -0800

----------------------------------------------------------------------
 .../testThinClientFixedPartitionResolver.cpp    |  8 +--
 .../testThinClientPRSingleHop.cpp               | 54 ++++++++++----------
 .../testThinClientPRSingleHopServerGroup.cpp    | 24 ++++-----
 .../testThinClientPartitionResolver.cpp         |  2 +-
 .../testThinClientPutAllPRSingleHop.cpp         |  6 +--
 src/cppcache/src/ClientMetadata.cpp             |  2 +-
 src/cppcache/src/ClientMetadataService.cpp      |  6 +--
 7 files changed, 51 insertions(+), 51 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp b/src/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
index 6f939f4..0e72ba2 100644
--- a/src/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
+++ b/src/cppcache/integration-test/testThinClientFixedPartitionResolver.cpp
@@ -236,8 +236,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_REGION)
 
       try {
         LOGDEBUG("CPPTEST: Putting key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGDEBUG("CheckPrSingleHopForIntKeysTask_REGION: networkhop %d ",
@@ -283,7 +283,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_REGION)
 
       try {
         LOGDEBUG("CPPTEST: getting key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
         dataReg->get(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -410,7 +410,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_REGION)
 
       try {
         LOGDEBUG("CPPTEST: destroying key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
         dataReg->destroy(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/integration-test/testThinClientPRSingleHop.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientPRSingleHop.cpp b/src/cppcache/integration-test/testThinClientPRSingleHop.cpp
index 9682f0a..9b41d45 100644
--- a/src/cppcache/integration-test/testThinClientPRSingleHop.cpp
+++ b/src/cppcache/integration-test/testThinClientPRSingleHop.cpp
@@ -293,7 +293,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, WarmUpTask)
           dynCast<CacheableKeyPtr>(CacheableInt32::create(i));
       try {
         LOGDEBUG("CPPTEST: put item %d", i);
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("WarmUpTask: networkhop is %d ", networkhop);
@@ -379,7 +379,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, WarmUpTask3)
           dynCast<CacheableKeyPtr>(CacheableInt32::create(i));
       try {
         LOGDEBUG("CPPTEST: put item %d", i);
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("WarmUpTask3: networkhop is %d ", networkhop);
@@ -524,9 +524,9 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForAllKeysTask)
 
       try {
         LOGDEBUG("CPPTEST: Putting key %s with hashcode %d", logmsg,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
 
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         ASSERT(!networkhop, "It is networkhop operation");
@@ -555,7 +555,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForAllKeysTask)
 
       try {
         LOGDEBUG("CPPTEST: Destroying key %s with hashcode %d", logmsg,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
 
         dataReg->destroy(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
@@ -639,8 +639,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
 
       try {
         LOGDEBUG("CPPTEST: Putting key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         int poolconn = TestUtils::getCacheImpl(getHelper()->cachePtr)
@@ -663,7 +663,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while putting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (CacheWriterException&) {
         // This is actually a success situation! Once bug #521 is fixed.
         // bool singlehop = TestUtils::getCacheImpl(getHelper(
@@ -676,7 +676,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while putting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (Exception& ex) {
         LOGERROR("CPPTEST: Put caused unexpected %s: %s", ex.getName(),
                  ex.getMessage());
@@ -692,7 +692,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
 
       try {
         LOGINFO("CPPTEST: Destroying key %i with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->destroy(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -720,7 +720,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
             "CPPTEST: SINGLEHOP SUCCEEDED while destroying key %d with "
             "hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (CacheWriterException&) {
         // This is actually a success situation! Once bug #521 is fixed.
         // bool singlehop = TestUtils::getCacheImpl(getHelper(
@@ -734,7 +734,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
             "CPPTEST: SINGLEHOP SUCCEEDED while destroying key %d with "
             "hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (Exception& ex) {
         LOGERROR("CPPTEST: Destroy caused unexpected %s: %s", ex.getName(),
                  ex.getMessage());
@@ -756,7 +756,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
 
       try {
         LOGDEBUG("CPPTEST: getting key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
         dataReg->get(keyPtr /*,(int32_t)keyPtr->hashcode()*/);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -783,7 +783,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (CacheWriterException&) {
         // This is actually a success situation! Once bug #521 is fixed.
         // bool singlehop = TestUtils::getCacheImpl(getHelper(
@@ -796,7 +796,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask2)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (Exception& ex) {
         LOGERROR("CPPTEST: get caused unexpected %s: %s", ex.getName(),
                  ex.getMessage());
@@ -878,7 +878,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForGetAllTask)
     for (int i = 0; i < 100; i++) {
       CacheableKeyPtr keyPtr =
           dynCast<CacheableKeyPtr>(CacheableInt32::create(i));
-      dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+      dataReg->put(keyPtr, keyPtr->hashcode());
       keys.push_back(keyPtr);
     }
 
@@ -906,8 +906,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
 
       try {
         LOGDEBUG("CPPTEST: Putting key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("CheckPrSingleHopForIntKeysTask: networkhop %d ", networkhop);
@@ -925,7 +925,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while putting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (CacheWriterException&) {
         // This is actually a success situation! Once bug #521 is fixed.
         // bool singlehop = TestUtils::getCacheImpl(getHelper(
@@ -938,7 +938,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while putting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (Exception& ex) {
         LOGERROR("CPPTEST: Put caused unexpected %s: %s", ex.getName(),
                  ex.getMessage());
@@ -954,7 +954,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
 
       try {
         LOGDEBUG("CPPTEST: Destroying key %i with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
         dataReg->destroy(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -974,7 +974,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
             "CPPTEST: SINGLEHOP SUCCEEDED while destroying key %d with "
             "hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (CacheWriterException&) {
         // This is actually a success situation! Once bug #521 is fixed.
         // bool singlehop = TestUtils::getCacheImpl(getHelper(
@@ -988,7 +988,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
             "CPPTEST: SINGLEHOP SUCCEEDED while destroying key %d with "
             "hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (Exception& ex) {
         LOGERROR("CPPTEST: Destroy caused unexpected %s: %s", ex.getName(),
                  ex.getMessage());
@@ -1010,7 +1010,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
 
       try {
         LOGDEBUG("CPPTEST: getting key %d with hashcode %d", i,
-                 static_cast<int32_t>(keyPtr->hashcode()));
+                 keyPtr->hashcode());
         dataReg->get(keyPtr /*,(int32_t)keyPtr->hashcode()*/);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -1029,7 +1029,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (CacheWriterException&) {
         // This is actually a success situation! Once bug #521 is fixed.
         // bool singlehop = TestUtils::getCacheImpl(getHelper(
@@ -1042,7 +1042,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
         LOGINFO(
             "CPPTEST: SINGLEHOP SUCCEEDED while getting key %d with hashcode "
             "%d",
-            i, static_cast<int32_t>(keyPtr->hashcode()));
+            i, keyPtr->hashcode());
       } catch (Exception& ex) {
         LOGERROR("CPPTEST: get caused unexpected %s: %s", ex.getName(),
                  ex.getMessage());
@@ -1255,7 +1255,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckGetAllTask)
     for (int i = 0; i < 100000; i++) {
       CacheableKeyPtr keyPtr =
           dynCast<CacheableKeyPtr>(CacheableInt32::create(i));
-      dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+      dataReg->put(keyPtr, keyPtr->hashcode());
       keys.push_back(keyPtr);
     }
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp b/src/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
index 6b22a0a..e422cf4 100644
--- a/src/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
+++ b/src/cppcache/integration-test/testThinClientPRSingleHopServerGroup.cpp
@@ -102,8 +102,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_CLIENT1)
 
       try {
         LOGINFO("CPPTEST: Putting key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("CheckPrSingleHopForIntKeysTask_CLIENT1: networkhop %d ",
@@ -167,7 +167,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_CLIENT1)
 
       try {
         LOGINFO("CPPTEST: getting key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->get(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -256,7 +256,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask_CLIENT1)
 
       try {
         LOGINFO("CPPTEST: destroying key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->destroy(keyPtr);
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
@@ -309,8 +309,8 @@ DUNIT_TASK_DEFINITION(CLIENT2, CheckPrSingleHopForIntKeysTask_CLIENT2)
 
       try {
         LOGINFO("CPPTEST: Putting key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("CheckPrSingleHopForIntKeysTask_CLIENT2: networkhop %d ",
@@ -373,7 +373,7 @@ DUNIT_TASK_DEFINITION(CLIENT2, CheckPrSingleHopForIntKeysTask_CLIENT2)
 
       try {
         LOGINFO("CPPTEST: getting key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->get(keyPtr);
         int8 serverGroupFlag = TestUtils::getCacheImpl(getHelper()->cachePtr)
                                    ->getAndResetServerGroupFlag();
@@ -455,7 +455,7 @@ DUNIT_TASK_DEFINITION(CLIENT2, CheckPrSingleHopForIntKeysTask_CLIENT2)
 
       try {
         LOGINFO("CPPTEST: destroying key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->destroy(keyPtr);
         int8 serverGroupFlag = TestUtils::getCacheImpl(getHelper()->cachePtr)
                                    ->getAndResetServerGroupFlag();
@@ -503,8 +503,8 @@ DUNIT_TASK_DEFINITION(CLIENT3, CheckPrSingleHopForIntKeysTask_CLIENT3)
 
       try {
         LOGINFO("CPPTEST: Putting key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("CheckPrSingleHopForIntKeysTask_CLIENT3: networkhop %d ",
@@ -567,7 +567,7 @@ DUNIT_TASK_DEFINITION(CLIENT3, CheckPrSingleHopForIntKeysTask_CLIENT3)
 
       try {
         LOGINFO("CPPTEST: getting key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->get(keyPtr);
         int8 serverGroupFlag = TestUtils::getCacheImpl(getHelper()->cachePtr)
                                    ->getAndResetServerGroupFlag();
@@ -646,7 +646,7 @@ DUNIT_TASK_DEFINITION(CLIENT3, CheckPrSingleHopForIntKeysTask_CLIENT3)
 
       try {
         LOGINFO("CPPTEST: destroying key %d with hashcode %d", i,
-                static_cast<int32_t>(keyPtr->hashcode()));
+                keyPtr->hashcode());
         dataReg->destroy(keyPtr);
         int8 serverGroupFlag = TestUtils::getCacheImpl(getHelper()->cachePtr)
                                    ->getAndResetServerGroupFlag();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/integration-test/testThinClientPartitionResolver.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientPartitionResolver.cpp b/src/cppcache/integration-test/testThinClientPartitionResolver.cpp
index 7864ddb..cf89b10 100644
--- a/src/cppcache/integration-test/testThinClientPartitionResolver.cpp
+++ b/src/cppcache/integration-test/testThinClientPartitionResolver.cpp
@@ -123,7 +123,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, PutThroughPartitionResolver)
       RegionPtr dataReg = getHelper()->getRegion(regionNames[0]);
       CacheableKeyPtr keyPtr =
           dynCast<CacheableKeyPtr>(CacheableInt32::create(i));
-      dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+      dataReg->put(keyPtr, keyPtr->hashcode());
     }
     SLEEP(5000);
     ASSERT(cpr->called, "Partition resolver not called");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp b/src/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
index f5035ba..0ae248b 100644
--- a/src/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
+++ b/src/cppcache/integration-test/testThinClientPutAllPRSingleHop.cpp
@@ -130,7 +130,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, WarmUpTask)
           dynCast<CacheableKeyPtr>(CacheableInt32::create(i));
       try {
         LOGINFO("CPPTEST: put item %d", i);
-        dataReg->put(keyPtr, static_cast<int32_t>(keyPtr->hashcode()));
+        dataReg->put(keyPtr, keyPtr->hashcode());
         bool networkhop = TestUtils::getCacheImpl(getHelper()->cachePtr)
                               ->getAndResetNetworkHopFlag();
         LOGINFO("WarmUpTask: networkhop is %d ", networkhop);
@@ -216,7 +216,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopForIntKeysTask)
           CacheablePtr valPtr =
               dynCast<CacheablePtr>(CacheableInt32::create(keyPtr->hashcode()));
           LOGINFO("CPPTEST: putALL CASE:: getting key %d with hashcode %d", j,
-                  static_cast<int32_t>(keyPtr->hashcode()));
+                  keyPtr->hashcode());
           valMap.insert(keyPtr, valPtr);
         }
         LOGINFO("TEST-1");
@@ -278,7 +278,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, CheckPrSingleHopRemoveAllForIntKeysTask)
           CacheablePtr valPtr =
               dynCast<CacheablePtr>(CacheableInt32::create(keyPtr->hashcode()));
           LOGINFO("CPPTEST: removeall CASE:: getting key %d with hashcode %d",
-                  j, static_cast<int32_t>(keyPtr->hashcode()));
+                  j, keyPtr->hashcode());
           valMap.insert(keyPtr, valPtr);
           keys.push_back(keyPtr);
         }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/src/ClientMetadata.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ClientMetadata.cpp b/src/cppcache/src/ClientMetadata.cpp
index 590e2d0..89a4242 100644
--- a/src/cppcache/src/ClientMetadata.cpp
+++ b/src/cppcache/src/ClientMetadata.cpp
@@ -344,7 +344,7 @@ int ClientMetadata::assignFixedBucketId(const char* partitionName,
   FixedMapType::iterator iter = m_fpaMap.find(partitionName);
   if (iter != m_fpaMap.end()) {
     std::vector<int> attList = iter->second;
-    int hc = static_cast<int>(resolvekey->hashcode());
+    int32_t hc = resolvekey->hashcode();
     int bucketId = std::abs(hc % (attList.at(0)));
     int partitionBucketID = bucketId + attList.at(1);
     return partitionBucketID;

http://git-wip-us.apache.org/repos/asf/geode-native/blob/a6057ec0/src/cppcache/src/ClientMetadataService.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/ClientMetadataService.cpp b/src/cppcache/src/ClientMetadataService.cpp
index 7c5a2be..7316199 100644
--- a/src/cppcache/src/ClientMetadataService.cpp
+++ b/src/cppcache/src/ClientMetadataService.cpp
@@ -278,7 +278,7 @@ void ClientMetadataService::getBucketServerLocation(
       }
     } else {
       if (cptr->getTotalNumBuckets() > 0) {
-        bucketId = std::abs(static_cast<int>(resolvekey->hashcode()) %
+        bucketId = std::abs(resolvekey->hashcode() %
                             cptr->getTotalNumBuckets());
       }
     }
@@ -429,7 +429,7 @@ ClientMetadataService::getServerToFilterMap(const VectorOfCacheableKey*
keys,
       resolveKey = resolver->getRoutingObject(event);
     }
 
-    int bucketId = std::abs(static_cast<int>(resolveKey->hashcode()) %
+    int bucketId = std::abs(resolveKey->hashcode() %
                             cptr->getTotalNumBuckets());
     VectorOfCacheableKeyPtr keyList = NULLPTR;
     std::map<int, BucketServerLocationPtr>::iterator bucketsIter =
@@ -564,7 +564,7 @@ ClientMetadataService::groupByBucketOnClientSide(const RegionPtr&
region,
       }
     } else {
       if (metadata->getTotalNumBuckets() > 0) {
-        bucketId = std::abs(static_cast<int>(resolvekey->hashcode()) %
+        bucketId = std::abs(resolvekey->hashcode() %
                             metadata->getTotalNumBuckets());
       }
     }


Mime
View raw message