geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [20/23] geode-native git commit: GEODE-2741: Code cleanup to move to std::shared_ptr
Date Tue, 06 Jun 2017 17:56:46 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientDurable.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurable.hpp b/src/cppcache/integration-test/ThinClientDurable.hpp
index 06f154a..52d5774 100644
--- a/src/cppcache/integration-test/ThinClientDurable.hpp
+++ b/src/cppcache/integration-test/ThinClientDurable.hpp
@@ -70,13 +70,7 @@ class OperMonitor : public CacheListener {
     if (value != nullptr) {
       sprintf(buff, "Event [%s, %d] called for %s:%s", keyPtr->toString(),
               value->value(), m_clientName.c_str(), m_regionName.c_str());
-
-      HashMapOfCacheable::Iterator item = m_map.find(key);
-      if (item != m_map.end()) {
-        m_map.update(key, value);
-      } else {
-        m_map.insert(key, value);
-      }
+      m_map[key] = value;
     } else {
       sprintf(buff, "Event Key=%s called for %s:%s", keyPtr->toString(),
               m_clientName.c_str(), m_regionName.c_str());
@@ -95,7 +89,7 @@ class OperMonitor : public CacheListener {
     LOG("validate called");
     char buf[256] = {'\0'};
 
-    sprintf(buf, "Expected %d keys for the region, Actual = %d", keyCount,
+    sprintf(buf, "Expected %d keys for the region, Actual = %zd", keyCount,
             m_map.size());
     ASSERT(m_map.size() == keyCount, buf);
 
@@ -103,12 +97,13 @@ class OperMonitor : public CacheListener {
             m_ops);
     ASSERT(m_ops == eventcount, buf);
 
-    for (HashMapOfCacheable::Iterator item = m_map.begin(); item != m_map.end();
-         item++) {
-      auto keyPtr = std::dynamic_pointer_cast<CacheableString>(item.first());
-      auto valuePtr = std::dynamic_pointer_cast<CacheableInt32>(item.second());
+    for (const auto& item : m_map) {
+      const auto keyPtr =
+          std::dynamic_pointer_cast<CacheableString>(item.first);
+      const auto valuePtr =
+          std::dynamic_pointer_cast<CacheableInt32>(item.second);
 
-      if (strchr(keyPtr->toString(), 'D') == NULL) { /*Non Durable Key */
+      if (strchr(keyPtr->toString(), 'D') == nullptr) { /*Non Durable Key */
         sprintf(buf,
                 "Expected final value for nonDurable Keys = %d, Actual = %d",
                 nonDurableValue, valuePtr->value());

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientDurableFailover.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurableFailover.hpp b/src/cppcache/integration-test/ThinClientDurableFailover.hpp
index 3085c6b..3a3318a 100644
--- a/src/cppcache/integration-test/ThinClientDurableFailover.hpp
+++ b/src/cppcache/integration-test/ThinClientDurableFailover.hpp
@@ -71,14 +71,8 @@ class OperMonitor : public CacheListener {
       LOG(buf);
     }
 
-    if (value != nullptr) {
-      HashMapOfCacheable::Iterator item = m_map.find(key);
-
-      if (item != m_map.end()) {
-        m_map.update(key, value);
-      } else {
-        m_map.insert(key, value);
-      }
+    if (value) {
+      m_map[key] = value;
     }
   }
 
@@ -92,7 +86,7 @@ class OperMonitor : public CacheListener {
     LOG("validate called");
     char buf[256] = {'\0'};
 
-    sprintf(buf, "Expected %d keys for the region, Actual = %d", keyCount,
+    sprintf(buf, "Expected %d keys for the region, Actual = %zd", keyCount,
             m_map.size());
     ASSERT(m_map.size() == keyCount, buf);
 
@@ -100,12 +94,11 @@ class OperMonitor : public CacheListener {
             m_ops);
     ASSERT(m_ops == eventcount, buf);
 
-    for (HashMapOfCacheable::Iterator item = m_map.begin(); item != m_map.end();
-         item++) {
-      auto keyPtr = std::dynamic_pointer_cast<CacheableString>(item.first());
-      auto valuePtr = std::dynamic_pointer_cast<CacheableInt32>(item.second());
+    for (const auto& item : m_map) {
+      auto keyPtr = std::dynamic_pointer_cast<CacheableString>(item.first);
+      auto valuePtr = std::dynamic_pointer_cast<CacheableInt32>(item.second);
 
-      if (strchr(keyPtr->toString(), 'D') == NULL) { /*Non Durable Key */
+      if (strchr(keyPtr->toString(), 'D') == nullptr) { /*Non Durable Key */
         sprintf(buf,
                 "Expected final value for nonDurable Keys = %d, Actual = %d",
                 nonDurableValue, valuePtr->value());

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientDurableInit.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurableInit.hpp b/src/cppcache/integration-test/ThinClientDurableInit.hpp
index 5e8e8c9..dd02c2d 100644
--- a/src/cppcache/integration-test/ThinClientDurableInit.hpp
+++ b/src/cppcache/integration-test/ThinClientDurableInit.hpp
@@ -55,7 +55,7 @@ void initClientAndRegion(int redundancy, int ClientIdx,
 }
 void initClientAndTwoRegions(int ClientIdx, int redundancy,
                              int durableClientTimeout,
-                             const char* conflation = NULL,
+                             const char* conflation = nullptr,
                              const char* rNames[] = regionNames) {
   PropertiesPtr pp = Properties::create();
   pp->insert("durable-client-id", durableIds[ClientIdx]);
@@ -72,7 +72,7 @@ void initClientAndTwoRegions(int ClientIdx, int redundancy,
 }
 void initClientAndTwoRegionsAndTwoPools(int ClientIdx, int redundancy,
                                         int durableClientTimeout,
-                                        const char* conflation = NULL,
+                                        const char* conflation = nullptr,
                                         const char* rNames[] = regionNames) {
   PropertiesPtr pp = Properties::create();
   pp->insert("durable-client-id", durableIds[ClientIdx]);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientDurableInterest.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientDurableInterest.hpp b/src/cppcache/integration-test/ThinClientDurableInterest.hpp
index b137013..01225a5 100644
--- a/src/cppcache/integration-test/ThinClientDurableInterest.hpp
+++ b/src/cppcache/integration-test/ThinClientDurableInterest.hpp
@@ -58,13 +58,7 @@ class OperMonitor : public CacheListener {
             m_id, key->toString()->asChar(), value->value());
     LOG(buf);
 
-    HashMapOfCacheable::Iterator item = m_map.find(key);
-
-    if (item != m_map.end()) {
-      m_map.update(key, value);
-    } else {
-      m_map.insert(key, value);
-    }
+    m_map[key] = value;
   }
 
  public:
@@ -81,7 +75,7 @@ class OperMonitor : public CacheListener {
     LOG("validate called");
     char buf[256] = {'\0'};
 
-    sprintf(buf, "Expected %d keys for the region, Actual = %d", keyCount,
+    sprintf(buf, "Expected %d keys for the region, Actual = %zd", keyCount,
             m_map.size());
     ASSERT(m_map.size() == keyCount, buf);
 
@@ -89,12 +83,13 @@ class OperMonitor : public CacheListener {
             m_ops);
     ASSERT(m_ops == eventcount, buf);
 
-    for (HashMapOfCacheable::Iterator item = m_map.begin(); item != m_map.end();
-         item++) {
-      auto keyPtr = std::dynamic_pointer_cast<CacheableString>(item.first());
-      auto valuePtr = std::dynamic_pointer_cast<CacheableInt32>(item.second());
+    for (const auto& item : m_map) {
+      const auto keyPtr =
+          std::dynamic_pointer_cast<CacheableString>(item.first);
+      const auto valuePtr =
+          std::dynamic_pointer_cast<CacheableInt32>(item.second);
 
-      if (strchr(keyPtr->toString(), 'D') == NULL) { /*Non Durable Key */
+      if (strchr(keyPtr->toString(), 'D') == nullptr) { /*Non Durable Key */
         sprintf(buf,
                 "Expected final value for nonDurable Keys = %d, Actual = %d",
                 nonDurableValue, valuePtr->value());

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailover.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailover.hpp b/src/cppcache/integration-test/ThinClientFailover.hpp
index 22d0639..8b91ebc 100644
--- a/src/cppcache/integration-test/ThinClientFailover.hpp
+++ b/src/cppcache/integration-test/ThinClientFailover.hpp
@@ -36,7 +36,7 @@ using namespace test;
 
 bool isLocalServer = false;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -48,20 +48,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -110,7 +110,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       }
       ASSERT(containsKeyCnt < MAX, "Key found in region.");
     }
-    if (val == NULL) {
+    if (val == nullptr) {
       if (regPtr->containsValueForKey(keyPtr)) {
         containsValueCnt++;
       } else {
@@ -119,8 +119,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       ASSERT(containsValueCnt < MAX, "Value found in region.");
     }
 
-    if (val != NULL) {
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+    if (val != nullptr) {
+      auto checkPtr =
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
       char buf[1024];
@@ -256,7 +257,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   // ASSERT( !regPtr->containsValueForKey( keyPtr ), "Value should not have been
   // found in region." );
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -265,7 +267,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailover2.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailover2.hpp b/src/cppcache/integration-test/ThinClientFailover2.hpp
index 6bffa38..27e70d9 100644
--- a/src/cppcache/integration-test/ThinClientFailover2.hpp
+++ b/src/cppcache/integration-test/ThinClientFailover2.hpp
@@ -39,7 +39,7 @@ using namespace test;
  */
 bool isLocalServer = false;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -51,20 +51,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -112,7 +112,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       }
       ASSERT(containsKeyCnt < MAX, "Key found in region.");
     }
-    if (val == NULL) {
+    if (val == nullptr) {
       if (regPtr->containsValueForKey(keyPtr)) {
         containsValueCnt++;
       } else {
@@ -121,8 +121,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       ASSERT(containsValueCnt < MAX, "Value found in region.");
     }
 
-    if (val != NULL) {
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+    if (val != nullptr) {
+      auto checkPtr =
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
       char buf[1024];
@@ -266,7 +267,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   ASSERT(!regPtr->containsValueForKey(keyPtr),
          "Value should not have been found in region.");
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -275,7 +277,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailover3.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailover3.hpp b/src/cppcache/integration-test/ThinClientFailover3.hpp
index 140bf65..7506812 100644
--- a/src/cppcache/integration-test/ThinClientFailover3.hpp
+++ b/src/cppcache/integration-test/ThinClientFailover3.hpp
@@ -37,7 +37,7 @@ using namespace test;
 
 bool isLocalServer = false;
 const char *endPoints = CacheHelper::getTcrEndpoints(isLocalServer, 3);
-CacheHelper *cacheHelper = NULL;
+CacheHelper *cacheHelper = nullptr;
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -49,20 +49,20 @@ const char *locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper *getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -110,7 +110,7 @@ void _verifyEntry(const char *name, const char *key, const char *val,
       }
       ASSERT(containsKeyCnt < MAX, "Key found in region.");
     }
-    if (val == NULL) {
+    if (val == nullptr) {
       if (regPtr->containsValueForKey(keyPtr)) {
         containsValueCnt++;
       } else {
@@ -119,8 +119,9 @@ void _verifyEntry(const char *name, const char *key, const char *val,
       ASSERT(containsValueCnt < MAX, "Value found in region.");
     }
 
-    if (val != NULL) {
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+    if (val != nullptr) {
+      auto checkPtr =
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
       char buf[1024];
@@ -223,7 +224,8 @@ void doNetsearch(const char *name, const char *key, const char *value) {
   fflush(stdout);
   ASSERT(regPtr != nullptr, "Region not found.");
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -232,7 +234,7 @@ void doNetsearch(const char *name, const char *key, const char *value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");
@@ -240,12 +242,12 @@ void doNetsearch(const char *name, const char *key, const char *value) {
 
 std::vector<char *> storeEndPoints(const char *points) {
   std::vector<char *> endpointNames;
-  if (points != NULL) {
+  if (points != nullptr) {
     char *ep = strdup(points);
     char *token = strtok(ep, ",");
     while (token) {
       endpointNames.push_back(token);
-      token = strtok(NULL, ",");
+      token = strtok(nullptr, ",");
     }
   }
   ASSERT(endpointNames.size() == 3, "There should be 3 end points");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailoverInterest.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailoverInterest.hpp b/src/cppcache/integration-test/ThinClientFailoverInterest.hpp
index 479079f..ab7ecfa 100644
--- a/src/cppcache/integration-test/ThinClientFailoverInterest.hpp
+++ b/src/cppcache/integration-test/ThinClientFailoverInterest.hpp
@@ -36,7 +36,7 @@ using namespace test;
 
 bool isLocalServer = false;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -48,20 +48,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -96,7 +96,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (noKey == false) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       // ASSERT( regPtr->containsValueForKey( keyPtr ), "Value not found in
       // region." );
     }
@@ -127,7 +127,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -136,8 +136,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
-        auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      if (val != nullptr) {
+        auto checkPtr =
+            std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
         char buf[1024];
@@ -173,7 +174,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
@@ -269,7 +270,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   // ASSERT( !regPtr->containsValueForKey( keyPtr ), "Value should not have been
   // found in region." );
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -278,7 +280,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailoverInterest2.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailoverInterest2.hpp b/src/cppcache/integration-test/ThinClientFailoverInterest2.hpp
index 4e50c5f..e915c30 100644
--- a/src/cppcache/integration-test/ThinClientFailoverInterest2.hpp
+++ b/src/cppcache/integration-test/ThinClientFailoverInterest2.hpp
@@ -34,7 +34,7 @@
 using namespace apache::geode::client;
 using namespace test;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 bool isLocalServer = false;
 
 #define CLIENT1 s1p1
@@ -47,20 +47,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -95,7 +95,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (noKey == false) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       // ASSERT( regPtr->containsValueForKey( keyPtr ), "Value not found in
       // region." );
     }
@@ -126,7 +126,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -135,8 +135,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
-        auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      if (val != nullptr) {
+        auto checkPtr =
+            std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
         char buf[1024];
@@ -172,7 +173,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
@@ -268,7 +269,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   // ASSERT( !regPtr->containsValueForKey( keyPtr ), "Value should not have been
   // found in region." );
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -277,7 +279,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp b/src/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
index 4b70787..c5998d5 100644
--- a/src/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
+++ b/src/cppcache/integration-test/ThinClientFailoverInterestAllWithCache.hpp
@@ -33,7 +33,7 @@
 using namespace apache::geode::client;
 using namespace test;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 bool isLocalServer = false;
 
 volatile bool g_poolConfig = false;
@@ -50,22 +50,22 @@ const char* locatorsG =
 #include "LocatorHelper.hpp"
 #include "ThinClientTasks_C2S2.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
-    cacheHelper = new CacheHelper(isthinClient, "__TEST_POOL1__", NULL,
+  if (cacheHelper == nullptr) {
+    cacheHelper = new CacheHelper(isthinClient, "__TEST_POOL1__", nullptr,
                                   "ServerGroup1", nullptr, 0, true);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -100,7 +100,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (!noKey) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       // ASSERT(regPtr->containsValueForKey(keyPtr),
       //    "Value not found in region.");
     }
@@ -131,7 +131,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -140,8 +140,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
-        auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      if (val != nullptr) {
+        auto checkPtr =
+            std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
         char buf[1024];
@@ -177,7 +178,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
@@ -254,7 +255,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   // ASSERT(!regPtr->containsValueForKey(keyPtr),
   //    "Value should not have been found in region.");
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -263,7 +265,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");
@@ -325,10 +327,11 @@ DUNIT_TASK_DEFINITION(CLIENT2, InitializeClient2)
     ASSERT(regPtr0->size() == 1, "Expected one entry in region");
     ASSERT(regPtr1->size() == 1, "Expected one entry in region");
     ASSERT(resultKeys->size() == 1, "Expected one key from registerAllKeys");
-    ASSERT(
-        strcmp(std::dynamic_pointer_cast<CacheableString>(resultKeys->operator[](0))->asChar(),
-               keys[1]) == 0,
-        "Unexpected key from registerAllKeys");
+    ASSERT(strcmp(std::dynamic_pointer_cast<CacheableString>(
+                      resultKeys->operator[](0))
+                      ->asChar(),
+                  keys[1]) == 0,
+           "Unexpected key from registerAllKeys");
 
     LOG("InitializeClient2 complete.");
   }
@@ -353,10 +356,11 @@ DUNIT_TASK_DEFINITION(CLIENT2, InitializeClient2Regex)
     ASSERT(regPtr0->size() == 1, "Expected one entry in region");
     ASSERT(regPtr1->size() == 1, "Expected one entry in region");
     ASSERT(resultKeys->size() == 1, "Expected one key from registerAllKeys");
-    ASSERT(
-        strcmp(std::dynamic_pointer_cast<CacheableString>(resultKeys->operator[](0))->asChar(),
-               keys[1]) == 0,
-        "Unexpected key from registerAllKeys");
+    ASSERT(strcmp(std::dynamic_pointer_cast<CacheableString>(
+                      resultKeys->operator[](0))
+                      ->asChar(),
+                  keys[1]) == 0,
+           "Unexpected key from registerAllKeys");
 
     verifyCreated(regionNames[0], keys[1]);
     verifyCreated(regionNames[1], keys[3]);
@@ -369,7 +373,7 @@ END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(CLIENT1, VerifyClient1)
   {
-    // check the combination of (resultKeys != NULL) and
+    // check the combination of (resultKeys != nullptr) and
     // (getValues == false) in registerAllKeys
     auto resultKeys = std::make_shared<VectorOfCacheableKey>();
     RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
@@ -380,10 +384,11 @@ DUNIT_TASK_DEFINITION(CLIENT1, VerifyClient1)
     ASSERT(!regPtr0->containsValueForKey(keys[1]),
            "Expected region to not contain the value");
     ASSERT(resultKeys->size() == 1, "Expected one key from registerAllKeys");
-    ASSERT(
-        strcmp(std::dynamic_pointer_cast<CacheableString>(resultKeys->operator[](0))->asChar(),
-               keys[1]) == 0,
-        "Unexpected key from registerAllKeys");
+    ASSERT(strcmp(std::dynamic_pointer_cast<CacheableString>(
+                      resultKeys->operator[](0))
+                      ->asChar(),
+                  keys[1]) == 0,
+           "Unexpected key from registerAllKeys");
 
     // check the same for registerRegex(".*")
     RegionPtr regPtr1 = getHelper()->getRegion(regionNames[1]);
@@ -395,10 +400,11 @@ DUNIT_TASK_DEFINITION(CLIENT1, VerifyClient1)
     ASSERT(!regPtr1->containsValueForKey(keys[3]),
            "Expected region to not contain the value");
     ASSERT(resultKeys->size() == 1, "Expected one key from registerRegex");
-    ASSERT(
-        strcmp(std::dynamic_pointer_cast<CacheableString>(resultKeys->operator[](0))->asChar(),
-               keys[3]) == 0,
-        "Unexpected key from registerRegex");
+    ASSERT(strcmp(std::dynamic_pointer_cast<CacheableString>(
+                      resultKeys->operator[](0))
+                      ->asChar(),
+                  keys[3]) == 0,
+           "Unexpected key from registerRegex");
 
     createEntry(regionNames[0], keys[0], vals[0]);
     updateEntry(regionNames[0], keys[1], vals[1]);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientFailoverRegex.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientFailoverRegex.hpp b/src/cppcache/integration-test/ThinClientFailoverRegex.hpp
index 37d8149..3118dff 100644
--- a/src/cppcache/integration-test/ThinClientFailoverRegex.hpp
+++ b/src/cppcache/integration-test/ThinClientFailoverRegex.hpp
@@ -36,7 +36,7 @@ using namespace test;
 
 bool isLocalServer = false;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 
 #define CLIENT1 s1p1
 #define CLIENT2 s1p2
@@ -48,20 +48,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, 1);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -96,7 +96,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (noKey == false) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       // ASSERT( regPtr->containsValueForKey( keyPtr ), "Value not found in
       // region." );
     }
@@ -127,7 +127,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -136,8 +136,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
-        auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      if (val != nullptr) {
+        auto checkPtr =
+            std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
         char buf[1024];
@@ -173,7 +174,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
@@ -269,7 +270,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   // ASSERT( !regPtr->containsValueForKey( keyPtr ), "Value should not have been
   // found in region." );
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -278,7 +280,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientGatewayTest.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientGatewayTest.hpp b/src/cppcache/integration-test/ThinClientGatewayTest.hpp
index 5b8c7c4..571c016 100644
--- a/src/cppcache/integration-test/ThinClientGatewayTest.hpp
+++ b/src/cppcache/integration-test/ThinClientGatewayTest.hpp
@@ -70,8 +70,8 @@ void setCacheListener(const char* regName, TallyListenerPtr regListener) {
   attrMutator->setCacheListener(regListener);
 }
 
-const char* locHostPort1 = NULL;
-const char* locHostPort2 = NULL;
+const char* locHostPort1 = nullptr;
+const char* locHostPort2 = nullptr;
 DUNIT_TASK_DEFINITION(SERVER1, StartLocator1)
   {
     CacheHelper::initLocator(1, false, true, 1,
@@ -116,8 +116,9 @@ END_TASK_DEFINITION
 
 DUNIT_TASK_DEFINITION(SERVER1, SetupClient)
   {
-    initClientWithPool(true, "poolName", locHostPort1, NULL);
-    RegionPtr regPtr = createRegionAndAttachPool("exampleRegion", true, NULL);
+    initClientWithPool(true, "poolName", locHostPort1, nullptr);
+    RegionPtr regPtr =
+        createRegionAndAttachPool("exampleRegion", true, nullptr);
     LOG(" region is created ");
     for (int i = 0; i < 100; i++) {
       LOG(" region is created put");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientHeapLRU.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientHeapLRU.hpp b/src/cppcache/integration-test/ThinClientHeapLRU.hpp
index 946ccb7..2020cdc 100644
--- a/src/cppcache/integration-test/ThinClientHeapLRU.hpp
+++ b/src/cppcache/integration-test/ThinClientHeapLRU.hpp
@@ -40,7 +40,7 @@ using namespace test;
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 static bool isLocator = false;
 static bool isLocalServer = false;
 static int numberOfLocators = 0;
@@ -61,7 +61,7 @@ const bool NO_ACK = false;
 #include "LocatorHelper.hpp"
 
 void initThinClientWithClientTypeAsCLIENT(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     PropertiesPtr pp = Properties::create();
     pp->insert("heap-lru-limit", 1);
     pp->insert("heap-lru-delta", 10);
@@ -73,20 +73,20 @@ void initThinClientWithClientTypeAsCLIENT(const bool isthinClient) {
 
 // void initClient( const bool isthinClient )
 //{
-//  if ( cacheHelper == NULL ) {
+//  if ( cacheHelper == nullptr ) {
 //    cacheHelper = new CacheHelper(isthinClient);
 //  }
 //  ASSERT( cacheHelper, "Failed to create a CacheHelper client instance." );
 //}
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -125,10 +125,13 @@ void createOnekEntries() {
         CacheableWrapperFactory::createInstance(GeodeTypeIds::CacheableBytes);
     tmpkey->initKey(i, 32);
     tmpval->initRandomValue(1024);
-    ASSERT(tmpkey->getCacheable() != nullptr, "tmpkey->getCacheable() is NULL");
-    ASSERT(tmpval->getCacheable() != nullptr, "tmpval->getCacheable() is NULL");
-    dataReg->put(std::dynamic_pointer_cast<CacheableKey>(tmpkey->getCacheable()),
-                 tmpval->getCacheable());
+    ASSERT(tmpkey->getCacheable() != nullptr,
+           "tmpkey->getCacheable() is nullptr");
+    ASSERT(tmpval->getCacheable() != nullptr,
+           "tmpval->getCacheable() is nullptr");
+    dataReg->put(
+        std::dynamic_pointer_cast<CacheableKey>(tmpkey->getCacheable()),
+        tmpval->getCacheable());
     // delete tmpkey;
     //  delete tmpval;
   }
@@ -171,8 +174,8 @@ END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_EndPoint)
   {
     initThinClientWithClientTypeAsCLIENT(true);
-    createPooledRegion(regionNames[0], USE_ACK, endPoints, NULL, poolName);
-    createPooledRegion(regionNames[1], NO_ACK, endPoints, NULL, poolName);
+    createPooledRegion(regionNames[0], USE_ACK, endPoints, nullptr, poolName);
+    createPooledRegion(regionNames[1], NO_ACK, endPoints, nullptr, poolName);
     LOG("StepOne complete.");
   }
 END_TASK_DEFINITION
@@ -198,8 +201,8 @@ END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT2, StepTwo_Pooled_EndPoint)
   {
     initThinClientWithClientTypeAsCLIENT(true);
-    createPooledRegion(regionNames[0], USE_ACK, endPoints, NULL, poolName);
-    createPooledRegion(regionNames[1], NO_ACK, endPoints, NULL, poolName);
+    createPooledRegion(regionNames[0], USE_ACK, endPoints, nullptr, poolName);
+    createPooledRegion(regionNames[1], NO_ACK, endPoints, nullptr, poolName);
     LOG("StepTwo_Pooled_EndPoint complete.");
   }
 END_TASK_DEFINITION

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientHelper.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientHelper.hpp b/src/cppcache/integration-test/ThinClientHelper.hpp
index ec9ba2b..9b206d2 100644
--- a/src/cppcache/integration-test/ThinClientHelper.hpp
+++ b/src/cppcache/integration-test/ThinClientHelper.hpp
@@ -45,14 +45,14 @@ using namespace apache::geode::client;
 using namespace test;
 using namespace unitTests;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 
 void initGridClient(const bool isthinClient,
                     const PropertiesPtr& configPtr = nullptr) {
   static bool s_isGridClient = true;
 
   s_isGridClient = !s_isGridClient;
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     PropertiesPtr config = configPtr;
     if (config == nullptr) {
       config = Properties::create();
@@ -65,7 +65,7 @@ void initGridClient(const bool isthinClient,
 
 void initClient(const bool isthinClient,
                 const PropertiesPtr& configPtr = nullptr) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient, configPtr);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
@@ -78,7 +78,7 @@ void initClientWithPool(const bool isthinClient, const char* poolName,
                         int subscriptionAckInterval = -1, int connections = -1,
                         int loadConditioningInterval = -1,
                         bool prSingleHop = false, bool threadLocal = false) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(
         isthinClient, poolName, locators, serverGroup, configPtr, redundancy,
         clientNotification, subscriptionAckInterval, connections,
@@ -89,7 +89,7 @@ void initClientWithPool(const bool isthinClient, const char* poolName,
 
 /* For HA Clients */
 void initClient(int redundancyLevel, const PropertiesPtr& configPtr = nullptr) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     PropertiesPtr config = configPtr;
     if (config == nullptr) {
       config = Properties::create();
@@ -104,7 +104,7 @@ void initGridClient(int redundancyLevel,
   static bool s_isGridClient = true;
 
   s_isGridClient = !s_isGridClient;
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     PropertiesPtr config = configPtr;
     if (config == nullptr) {
       config = Properties::create();
@@ -116,32 +116,32 @@ void initGridClient(int redundancyLevel,
 }
 
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 void netDown() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     TestUtils::getCacheImpl(cacheHelper->cachePtr)->netDown();
   }
 }
 
 void revive() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     TestUtils::getCacheImpl(cacheHelper->cachePtr)->revive();
   }
 }
 
 void crashClient() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     TestUtils::getCacheImpl(cacheHelper->cachePtr)->setClientCrashTEST();
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -185,7 +185,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
   if (noKey == false) {  // need to find the key!
     ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
   }
-  if (val != NULL && checkVal) {  // need to have a value!
+  if (val != nullptr && checkVal) {  // need to have a value!
     ASSERT(regPtr->containsValueForKey(keyPtr), "Value not found in region.");
   }
 
@@ -205,7 +205,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       }
       ASSERT(containsKeyCnt < MAX, "Key found in region.");
     }
-    if (val == NULL) {
+    if (val == nullptr) {
       if (regPtr->containsValueForKey(keyPtr)) {
         containsValueCnt++;
       } else {
@@ -214,7 +214,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       ASSERT(containsValueCnt < MAX, "Value found in region.");
     }
 
-    if (val != NULL) {
+    if (val != nullptr) {
       auto checkPtr =
           std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
@@ -415,8 +415,8 @@ RegionPtr createPooledRegion(const char* name, bool ackMode,
   fprintf(stdout, "Creating region --  %s  ackMode is %d\n", name, ackMode);
   fflush(stdout);
 
-  if (cacheHelper == NULL) {
-    cacheHelper = new CacheHelper(true, poolname, locators, NULL);
+  if (cacheHelper == nullptr) {
+    cacheHelper = new CacheHelper(true, poolname, locators, nullptr);
   }
 
   // ack, caching
@@ -467,7 +467,7 @@ PoolPtr createPoolAndDestroy(const char* poolName, const char* locators,
 }
 // this will create pool even endpoints and locatorhost has been not defined
 PoolPtr createPool2(const char* poolName, const char* locators,
-                    const char* serverGroup, const char* servers = NULL,
+                    const char* serverGroup, const char* servers = nullptr,
                     int redundancy = 0, bool clientNotification = false) {
   LOG("createPool2() entered.");
 
@@ -577,7 +577,7 @@ void doNetsearch(const char* name, const char* key, const char* value,
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientInterestList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientInterestList.hpp b/src/cppcache/integration-test/ThinClientInterestList.hpp
index 1f09290..77aed90 100644
--- a/src/cppcache/integration-test/ThinClientInterestList.hpp
+++ b/src/cppcache/integration-test/ThinClientInterestList.hpp
@@ -37,7 +37,7 @@ using namespace test;
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 bool isLocalServer = false;
 
 static bool isLocator = false;
@@ -46,20 +46,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -94,7 +94,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (noKey == false) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       ASSERT(regPtr->containsValueForKey(keyPtr), "Value not found in region.");
     }
   }
@@ -124,7 +124,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -133,8 +133,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
-        auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      if (val != nullptr) {
+        auto checkPtr =
+            std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
         char buf[1024];
@@ -190,7 +191,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
@@ -207,14 +208,15 @@ void createPooledRegion(const char* name, bool ackMode, const char* locatorsG,
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Pooled Region created.");
 }
-void createEntry(const char* name, const char* key, const char* value = NULL) {
+void createEntry(const char* name, const char* key,
+                 const char* value = nullptr) {
   LOG("createEntry() entered.");
   fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
           value, name);
   fflush(stdout);
   // Create entry, verify entry is correct
   CacheableKeyPtr keyPtr = createKey(key);
-  if (value == NULL) {
+  if (value == nullptr) {
     value = "";
   }
   CacheableStringPtr valPtr = CacheableString::create(value);
@@ -278,7 +280,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   ASSERT(!regPtr->containsValueForKey(keyPtr),
          "Value should not have been found in region.");
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -287,7 +290,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientInterestList2.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientInterestList2.hpp b/src/cppcache/integration-test/ThinClientInterestList2.hpp
index 23e8d08..a84a9ee 100644
--- a/src/cppcache/integration-test/ThinClientInterestList2.hpp
+++ b/src/cppcache/integration-test/ThinClientInterestList2.hpp
@@ -37,7 +37,7 @@ using namespace test;
 #define CLIENT2 s1p2
 #define SERVER1 s2p1
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 bool isLocalServer = false;
 
 static bool isLocator = false;
@@ -46,20 +46,20 @@ const char* locatorsG =
     CacheHelper::getLocatorHostPort(isLocator, isLocalServer, numberOfLocators);
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -94,7 +94,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (noKey == false) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       ASSERT(regPtr->containsValueForKey(keyPtr), "Value not found in region.");
     }
   }
@@ -124,7 +124,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -133,8 +133,9 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
-        auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      if (val != nullptr) {
+        auto checkPtr =
+            std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
         ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
         char buf[1024];
@@ -190,7 +191,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 
@@ -207,14 +208,15 @@ void createPooledRegion(const char* name, bool ackMode, const char* locators,
   ASSERT(regPtr != nullptr, "Failed to create region.");
   LOG("Pooled Region created.");
 }
-void createEntry(const char* name, const char* key, const char* value = NULL) {
+void createEntry(const char* name, const char* key,
+                 const char* value = nullptr) {
   LOG("createEntry() entered.");
   fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
           value, name);
   fflush(stdout);
   // Create entry, verify entry is correct
   CacheableKeyPtr keyPtr = createKey(key);
-  if (value == NULL) {
+  if (value == nullptr) {
     value = "";
   }
   CacheableStringPtr valPtr = CacheableString::create(value);
@@ -278,7 +280,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
   ASSERT(!regPtr->containsValueForKey(keyPtr),
          "Value should not have been found in region.");
 
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      regPtr->get(keyPtr));  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -287,7 +290,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientListenerInit.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientListenerInit.hpp b/src/cppcache/integration-test/ThinClientListenerInit.hpp
index 340206a..4b803b7 100644
--- a/src/cppcache/integration-test/ThinClientListenerInit.hpp
+++ b/src/cppcache/integration-test/ThinClientListenerInit.hpp
@@ -62,8 +62,8 @@ class ThinClientTallyLoader : public TallyLoader {
     char lstrvalue[32];
     sprintf(lstrvalue, "%i", loadValue);
     CacheableStringPtr lreturnValue = CacheableString::create(lstrvalue);
-    if (key != nullptr && (NULL != rp->getAttributes()->getEndpoints() ||
-                           rp->getAttributes()->getPoolName() != NULL)) {
+    if (key != nullptr && (nullptr != rp->getAttributes()->getEndpoints() ||
+                           rp->getAttributes()->getPoolName() != nullptr)) {
       LOGDEBUG("Putting the value (%s) for local region clients only ",
                lstrvalue);
       rp->put(key, lreturnValue);
@@ -187,7 +187,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, testCreatesAndUpdates)
     see bug #252
     try {
       regPtr->create(keyPtr1, nvals[1]);
-      ASSERT(NULL, "Expected an EntryExistsException");
+      ASSERT(nullptr, "Expected an EntryExistsException");
     } catch(EntryExistsException &) {
       //Expected Behavior
     }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientListenerWriter.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientListenerWriter.hpp b/src/cppcache/integration-test/ThinClientListenerWriter.hpp
index b150c9f..d037bf0 100644
--- a/src/cppcache/integration-test/ThinClientListenerWriter.hpp
+++ b/src/cppcache/integration-test/ThinClientListenerWriter.hpp
@@ -286,7 +286,7 @@ DUNIT_TASK_DEFINITION(CLIENT2, SetupClient2withCachingEnabled_Pooled_Locator)
 
     createPooledRegion(myRegNames[0], false, locatorsG, poolName, true,
                        distRegCacheListener, true);
-    createPooledRegion(myRegNames[1], false, locatorsG, poolName, true, NULL,
+    createPooledRegion(myRegNames[1], false, locatorsG, poolName, true, nullptr,
                        true);
     createPooledRegion(myRegNames[2], false, locatorsG, poolName, true,
                        parentRegCacheListener, true);

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientLocalCacheLoader.hpp b/src/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
index bb03832..2a90a08 100644
--- a/src/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
+++ b/src/cppcache/integration-test/ThinClientLocalCacheLoader.hpp
@@ -51,8 +51,8 @@ class ThinClientTallyLoader : public TallyLoader {
     char lstrvalue[32];
     sprintf(lstrvalue, "%i", loadValue);
     CacheableStringPtr lreturnValue = CacheableString::create(lstrvalue);
-    if (key != nullptr && (NULL != rp->getAttributes()->getEndpoints() ||
-                           rp->getAttributes()->getPoolName() != NULL)) {
+    if (key != nullptr && (nullptr != rp->getAttributes()->getEndpoints() ||
+                           rp->getAttributes()->getPoolName() != nullptr)) {
       LOGDEBUG("Putting the value (%s) for local region clients only ",
                lstrvalue);
       rp->put(key, lreturnValue);
@@ -68,7 +68,7 @@ class ThinClientTallyLoader : public TallyLoader {
       ASSERT(region->isDestroyed() == true,
              "region.isDestroyed should return true");
       /*
-      if(region.get() != NULL && region.get()->getCache() != nullptr){
+      if(region.get() != nullptr && region.get()->getCache() != nullptr){
         LOGINFO(" Cache Name is Closed = %d ",
       region.get()->getCache()->isClosed());
       }else{

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientNotification.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientNotification.hpp b/src/cppcache/integration-test/ThinClientNotification.hpp
index 3b35bc1..4e0b195 100644
--- a/src/cppcache/integration-test/ThinClientNotification.hpp
+++ b/src/cppcache/integration-test/ThinClientNotification.hpp
@@ -34,7 +34,7 @@
 using namespace apache::geode::client;
 using namespace test;
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 
 #include "locator_globals.hpp"
 
@@ -43,21 +43,21 @@ CacheHelper* cacheHelper = NULL;
 #define SERVER1 s2p1
 #include "LocatorHelper.hpp"
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient, "__TEST_POOL1__", locatorsG,
                                   "ServerGroup1", nullptr, 0, true);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -107,7 +107,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       }
       ASSERT(containsKeyCnt < MAX, "Key found in region.");
     }
-    if (val == NULL) {
+    if (val == nullptr) {
       if (regPtr->containsValueForKey(keyPtr)) {
         containsValueCnt++;
       } else {
@@ -116,9 +116,10 @@ void _verifyEntry(const char* name, const char* key, const char* val,
       ASSERT(containsValueCnt < MAX, "Value found in region.");
     }
 
-    if (val != NULL) {
+    if (val != nullptr) {
       LOG(" checkin val");
-      auto checkPtr = std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
+      auto checkPtr =
+          std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
       ASSERT(checkPtr != nullptr, "Value Ptr should not be null.");
       char buf[1024];
@@ -253,7 +254,8 @@ void doNetsearch(const char* name, const char* key, const char* value) {
          "Value should not have been found in region.");
 
   CacheablePtr theValue = regPtr->get(keyPtr);
-  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(theValue);  // force a netsearch
+  auto checkPtr = std::dynamic_pointer_cast<CacheableString>(
+      theValue);  // force a netsearch
 
   if (checkPtr != nullptr) {
     LOG("checkPtr is not null");
@@ -262,7 +264,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientPdxSerializer.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientPdxSerializer.hpp b/src/cppcache/integration-test/ThinClientPdxSerializer.hpp
index b7935ff..571cff7 100644
--- a/src/cppcache/integration-test/ThinClientPdxSerializer.hpp
+++ b/src/cppcache/integration-test/ThinClientPdxSerializer.hpp
@@ -59,7 +59,7 @@ static bool m_useWeakHashMap ATTR_UNUSED = false;
 
 void initClient(const bool isthinClient, bool isPdxIgnoreUnreadFields) {
   LOGINFO("initClient: isPdxIgnoreUnreadFields = %d ", isPdxIgnoreUnreadFields);
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient, isPdxIgnoreUnreadFields, false,
                                   nullptr, false);
   }
@@ -70,7 +70,7 @@ void stepOne(bool isPdxIgnoreUnreadFields = false) {
   // Create just one pool and attach all regions to that.
   initClient(true, isPdxIgnoreUnreadFields);
   isPoolConfig = true;
-  createPool(poolNames[0], locHostPort, NULL, 0, true);
+  createPool(poolNames[0], locHostPort, nullptr, 0, true);
   createRegionAndAttachPool("DistRegionAck", USE_ACK, poolNames[0],
                             false /*Caching disabled*/);
   LOG("StepOne complete.");

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientPdxSerializers.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientPdxSerializers.hpp b/src/cppcache/integration-test/ThinClientPdxSerializers.hpp
index f9ef18e..b29a6df 100644
--- a/src/cppcache/integration-test/ThinClientPdxSerializers.hpp
+++ b/src/cppcache/integration-test/ThinClientPdxSerializers.hpp
@@ -71,7 +71,7 @@ class TestPdxSerializer : public PdxSerializer {
       npa->_city = pr->readString("_city");
       return (void *)npa;
     } catch (...) {
-      return NULL;
+      return nullptr;
     }
   }
 
@@ -109,7 +109,8 @@ class TestPdxSerializer : public PdxSerializer {
       npt->m_arraylist = std::dynamic_pointer_cast<CacheableArrayList>(
           pr->readObject("m_arraylist"));
 
-      npt->m_map = std::dynamic_pointer_cast<CacheableHashMap>(pr->readObject("m_map"));
+      npt->m_map =
+          std::dynamic_pointer_cast<CacheableHashMap>(pr->readObject("m_map"));
       // TODO:Check for the size
 
       npt->m_hashtable = std::dynamic_pointer_cast<CacheableHashTable>(
@@ -171,7 +172,7 @@ class TestPdxSerializer : public PdxSerializer {
 
       LOGINFO("TestPdxSerializer: NonPdxType fromData() Done.");
     } catch (...) {
-      return NULL;
+      return nullptr;
     }
     return (void *)npt;
   }

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientPutAll.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientPutAll.hpp b/src/cppcache/integration-test/ThinClientPutAll.hpp
index 4fd8044..35a98aa 100644
--- a/src/cppcache/integration-test/ThinClientPutAll.hpp
+++ b/src/cppcache/integration-test/ThinClientPutAll.hpp
@@ -40,7 +40,7 @@ using namespace test;
 #define SERVER1 s2p1
 #define SERVER2 s2p2
 
-CacheHelper* cacheHelper = NULL;
+CacheHelper* cacheHelper = nullptr;
 static bool isLocalServer = false;
 static bool isLocator = false;
 static int numberOfLocators = 0;
@@ -52,20 +52,20 @@ const char* poolName = "__TESTPOOL1_";
 #include "LocatorHelper.hpp"
 
 void initClient(const bool isthinClient) {
-  if (cacheHelper == NULL) {
+  if (cacheHelper == nullptr) {
     cacheHelper = new CacheHelper(isthinClient);
   }
   ASSERT(cacheHelper, "Failed to create a CacheHelper client instance.");
 }
 void cleanProc() {
-  if (cacheHelper != NULL) {
+  if (cacheHelper != nullptr) {
     delete cacheHelper;
-    cacheHelper = NULL;
+    cacheHelper = nullptr;
   }
 }
 
 CacheHelper* getHelper() {
-  ASSERT(cacheHelper != NULL, "No cacheHelper initialized.");
+  ASSERT(cacheHelper != nullptr, "No cacheHelper initialized.");
   return cacheHelper;
 }
 
@@ -100,7 +100,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
     if (noKey == false) {  // need to find the key!
       ASSERT(regPtr->containsKey(keyPtr), "Key not found in region.");
     }
-    if (val != NULL) {  // need to have a value!
+    if (val != nullptr) {  // need to have a value!
       ASSERT(regPtr->containsValueForKey(keyPtr), "Value not found in region.");
     }
   }
@@ -130,7 +130,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         }
         ASSERT(containsKeyCnt < MAX, "Key found in region.");
       }
-      if (val == NULL) {
+      if (val == nullptr) {
         if (regPtr->containsValueForKey(keyPtr)) {
           containsValueCnt++;
         } else {
@@ -139,7 +139,7 @@ void _verifyEntry(const char* name, const char* key, const char* val,
         ASSERT(containsValueCnt < MAX, "Value found in region.");
       }
 
-      if (val != NULL) {
+      if (val != nullptr) {
         auto checkPtr =
             std::dynamic_pointer_cast<CacheableString>(regPtr->get(keyPtr));
 
@@ -197,7 +197,7 @@ void _verifyCreated(const char* name, const char* key, int line) {
   char logmsg[1024];
   sprintf(logmsg, "verifyCreated() called from %d.\n", line);
   LOG(logmsg);
-  _verifyEntry(name, key, NULL, false, true);
+  _verifyEntry(name, key, nullptr, false, true);
   LOG("Entry created.");
 }
 void createRegion(const char* name, bool ackMode, bool isCacheEnabled,
@@ -238,14 +238,15 @@ void createPooledRegionConcurrencyCheckDisabled(
   LOG("Pooled Region created.");
 }
 
-void createEntry(const char* name, const char* key, const char* value = NULL) {
+void createEntry(const char* name, const char* key,
+                 const char* value = nullptr) {
   LOG("createEntry() entered.");
   fprintf(stdout, "Creating entry -- key: %s  value: %s in region %s\n", key,
           value, name);
   fflush(stdout);
   // Create entry, verify entry is correct
   CacheableKeyPtr keyPtr = createKey(key);
-  if (value == NULL) {
+  if (value == nullptr) {
     value = "";
   }
   CacheableStringPtr valPtr = CacheableString::create(value);
@@ -319,7 +320,7 @@ void doNetsearch(const char* name, const char* key, const char* value) {
             checkPtr->asChar(), key);
     LOG(buf);
   } else {
-    LOG("checkPtr is NULL");
+    LOG("checkPtr is nullptr");
   }
   verifyEntry(name, key, value);
   LOG("Netsearch complete.");
@@ -375,8 +376,9 @@ END_TASK_DEFINITION
 DUNIT_TASK_DEFINITION(CLIENT1, StepOne_Pooled_Locator_ConcurrencyCheckDisabled)
   {
     initClient(true);
-    createPooledRegionConcurrencyCheckDisabled(
-        regionNames[0], USE_ACK, NULL, locatorsG, poolName, true, true, false);
+    createPooledRegionConcurrencyCheckDisabled(regionNames[0], USE_ACK, nullptr,
+                                               locatorsG, poolName, true, true,
+                                               false);
     LOG("StepOne_Pooled_Locator_ConcurrencyCheckDisabled complete.");
   }
 END_TASK_DEFINITION
@@ -444,12 +446,12 @@ DUNIT_TASK_DEFINITION(CLIENT2, StepFour)
     map0.clear();
     map1.clear();
     for (int i = 0; i < 2; i++) {
-      map0.insert(CacheableKey::create(keys[i]),
-                  CacheableString::create(vals[i]));
+      map0.emplace(CacheableKey::create(keys[i]),
+                   CacheableString::create(vals[i]));
     }
     for (int i = 2; i < 4; i++) {
-      map1.insert(CacheableKey::create(keys[i]),
-                  CacheableString::create(vals[i]));
+      map1.emplace(CacheableKey::create(keys[i]),
+                   CacheableString::create(vals[i]));
     }
     RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
     RegionPtr regPtr1 = getHelper()->getRegion(regionNames[1]);
@@ -468,8 +470,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, PutAllOps)
     for (int32_t item = 0; item < 500; item++) {
       sprintf(key, "key-%d", item);
       sprintf(value, "%d", item);
-      entryMap.insert(CacheableKey::create(key),
-                      CacheableString::create(value));
+      entryMap.emplace(CacheableKey::create(key),
+                       CacheableString::create(value));
     }
 
     RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
@@ -520,12 +522,12 @@ DUNIT_TASK_DEFINITION(CLIENT2, StepSix)
     map0.clear();
     map1.clear();
     for (int i = 0; i < 2; i++) {
-      map0.insert(CacheableKey::create(keys[i]),
-                  CacheableString::create(nvals[i]));
+      map0.emplace(CacheableKey::create(keys[i]),
+                   CacheableString::create(nvals[i]));
     }
     for (int i = 2; i < 4; i++) {
-      map1.insert(CacheableKey::create(keys[i]),
-                  CacheableString::create(nvals[i]));
+      map1.emplace(CacheableKey::create(keys[i]),
+                   CacheableString::create(nvals[i]));
     }
     RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
     RegionPtr regPtr1 = getHelper()->getRegion(regionNames[1]);
@@ -560,7 +562,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepEight)
       char val0[2500] = {0};
       sprintf(key0, "key-%d", i);
       sprintf(val0, "%1000d", i);
-      map0.insert(CacheableKey::create(key0), CacheableString::create(val0));
+      map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
     }
     RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
 
@@ -632,7 +634,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
     HashMapOfCacheable map0;
     for (int i = 0; i < 2; i++) {
-      map0.insert(CacheableInt64::create(i), CacheableInt64::create(i));
+      map0.emplace(CacheableInt64::create(i), CacheableInt64::create(i));
     }
     regPtr0->putAll(map0);
     for (int i = 0; i < 2; i++) {
@@ -645,8 +647,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     const char* vals[] = {"Value-100", "Value-200"};
 
     for (int i = 80; i < 82; i++) {
-      map0.insert(CacheableInt64::create(i),
-                  CacheableString::create(vals[i - 80]));
+      map0.emplace(CacheableInt64::create(i),
+                   CacheableString::create(vals[i - 80]));
     }
     regPtr0->putAll(map0);
     for (int i = 80; i < 82; i++) {
@@ -658,7 +660,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     map0.clear();
 
     auto val111 = std::make_shared<PdxTests::PdxTypes1>();
-    map0.insert(CacheableInt32::create(1211), val111);
+    map0.emplace(CacheableInt32::create(1211), val111);
     regPtr0->putAll(map0);
     auto retObj = std::dynamic_pointer_cast<PdxTests::PdxTypes1>(
         regPtr0->get(CacheableInt32::create(1211)));
@@ -666,7 +668,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     map0.clear();
 
     auto keyObject = std::make_shared<PdxTests::PdxType>();
-    map0.insert(keyObject, CacheableInt32::create(111));
+    map0.emplace(keyObject, CacheableInt32::create(111));
     regPtr0->putAll(map0);
     auto checkPtr =
         std::dynamic_pointer_cast<CacheableInt32>(regPtr0->get(keyObject));
@@ -674,7 +676,7 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
            "putAll with entry as object key and value as int  Mismatch");
     map0.clear();
     auto keyObject6 = std::make_shared<PdxTests::PdxTypes3>();
-    map0.insert(keyObject6, CacheableString::create("testString"));
+    map0.emplace(keyObject6, CacheableString::create("testString"));
     regPtr0->putAll(map0);
     CacheablePtr checkPtr1 = regPtr0->get(keyObject6);
     ASSERT(strcmp(checkPtr1->toString()->asChar(), "testString") == 0,
@@ -685,8 +687,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     auto valObject = std::make_shared<PdxTests::PdxTypes1>();
     auto keyObject8 = std::make_shared<PdxTests::PdxTypes2>();
     auto valObject2 = std::make_shared<PdxTests::PdxTypes1>();
-    map0.insert(keyObject7, valObject);
-    map0.insert(keyObject8, valObject2);
+    map0.emplace(keyObject7, valObject);
+    map0.emplace(keyObject8, valObject2);
     regPtr0->putAll(map0);
     auto objVal = std::dynamic_pointer_cast<PdxTests::PdxTypes1>(
         regPtr0->get(keyObject7));
@@ -694,7 +696,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     map0.clear();
 
     try {
-      map0.insert(CacheableInt64::create(345), CacheableInt64::create(3465987));
+      map0.emplace(CacheableInt64::create(345),
+                   CacheableInt64::create(3465987));
       regPtr0->putAll(map0, -1);
       auto checkPtr = std::dynamic_pointer_cast<CacheableInt64>(
           regPtr0->get(CacheableInt64::create(345)));
@@ -711,8 +714,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     map0.clear();
 
     try {
-      map0.insert(CacheableInt64::create(3451),
-                  CacheableInt64::create(3465987));
+      map0.emplace(CacheableInt64::create(3451),
+                   CacheableInt64::create(3465987));
       regPtr0->putAll(map0, 2147500);
       auto checkPtr = std::dynamic_pointer_cast<CacheableInt64>(
           regPtr0->get(CacheableInt64::create(3451)));
@@ -738,10 +741,9 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepThirteen)
     regPtr0->getAll(keys1, valuesMap, nullptr, true);
     if (valuesMap->size() == keys1.size()) {
       char buf[2048];
-      for (HashMapOfCacheable::Iterator iter = valuesMap->begin();
-           iter != valuesMap->end(); iter++) {
-        auto key = std::dynamic_pointer_cast<CacheableKey>(iter.first());
-        CacheablePtr mVal = iter.second();
+      for (const auto& iter : *valuesMap) {
+        const auto key = std::dynamic_pointer_cast<CacheableKey>(iter.first);
+        const auto& mVal = iter.second;
         if (mVal != nullptr) {
           auto val1 = std::dynamic_pointer_cast<PdxTests::PdxTypes1>(mVal);
           sprintf(buf, "value from map %d , expected value %d ",

http://git-wip-us.apache.org/repos/asf/geode-native/blob/11467dd9/src/cppcache/integration-test/ThinClientPutAllTimeout.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/integration-test/ThinClientPutAllTimeout.hpp b/src/cppcache/integration-test/ThinClientPutAllTimeout.hpp
index 57c475e..71c07ba 100644
--- a/src/cppcache/integration-test/ThinClientPutAllTimeout.hpp
+++ b/src/cppcache/integration-test/ThinClientPutAllTimeout.hpp
@@ -109,13 +109,13 @@ void putAllWithOneEntryTimeout(int timeout, int waitTimeOnServer) {
     char val0[2500] = {0};
     sprintf(key0, "key-%d", i);
     sprintf(val0, "%1000d", i);
-    map0.insert(CacheableKey::create(key0), CacheableString::create(val0));
+    map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
   }
 
   char val[16];
   sprintf(val, "%d", waitTimeOnServer);
-  map0.insert(CacheableKey::create("timeout-this-entry"),
-              CacheableString::create(val));
+  map0.emplace(CacheableKey::create("timeout-this-entry"),
+               CacheableString::create(val));
 
   RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
 
@@ -133,13 +133,13 @@ void putAllWithOneEntryTimeoutWithCallBackArg(int timeout,
     char val0[2500] = {0};
     sprintf(key0, "key-%d", i);
     sprintf(val0, "%1000d", i);
-    map0.insert(CacheableKey::create(key0), CacheableString::create(val0));
+    map0.emplace(CacheableKey::create(key0), CacheableString::create(val0));
   }
 
   char val[16];
   sprintf(val, "%d", waitTimeOnServer);
-  map0.insert(CacheableKey::create("timeout-this-entry"),
-              CacheableString::create(val));
+  map0.emplace(CacheableKey::create("timeout-this-entry"),
+               CacheableString::create(val));
 
   RegionPtr regPtr0 = getHelper()->getRegion(regionNames[0]);
 


Mime
View raw message