This is an automated email from the ASF dual-hosted git repository.

bbender pushed a commit to branch support/1.14
in repository https://gitbox.apache.org/repos/asf/geode-native.git


The following commit(s) were added to refs/heads/support/1.14 by this push:
     new d8cd1e9  Fix formatting
d8cd1e9 is described below

commit d8cd1e9ad6057a4e76fb294aa72887793593c517
Author: Blake Bender <[email protected]>
AuthorDate: Wed Sep 1 15:17:42 2021 -0700

    Fix formatting
---
 cppcache/include/geode/CacheableString.hpp        |  10 +-
 cppcache/include/geode/DataInput.hpp              |   2 +-
 cppcache/src/CacheTransactionManagerImpl.cpp      |   4 +-
 cppcache/src/ExceptionTypes.cpp                   | 107 ++++++++++++----------
 cppcache/src/RegionAttributes.cpp                 |  31 +++----
 cppcache/src/VersionedCacheableObjectPartList.cpp |   4 +-
 6 files changed, 76 insertions(+), 82 deletions(-)

diff --git a/cppcache/include/geode/CacheableString.hpp 
b/cppcache/include/geode/CacheableString.hpp
index 91a651c..e5973af 100644
--- a/cppcache/include/geode/CacheableString.hpp
+++ b/cppcache/include/geode/CacheableString.hpp
@@ -54,11 +54,11 @@ class APACHE_GEODE_EXPORT CacheableString
       : m_str(std::move(value)), m_hashcode(0) {
     bool ascii = isAscii(m_str);
 
-    m_type = m_str.length() > std::numeric_limits<uint16_t>::max()
-                 ? ascii ? DSCode::CacheableASCIIStringHuge
-                         : DSCode::CacheableStringHuge
-             : ascii ? DSCode::CacheableASCIIString
-                     : DSCode::CacheableString;
+    m_type =
+        m_str.length() > std::numeric_limits<uint16_t>::max()
+            ? ascii ? DSCode::CacheableASCIIStringHuge
+                    : DSCode::CacheableStringHuge
+            : ascii ? DSCode::CacheableASCIIString : DSCode::CacheableString;
   }
 
   ~CacheableString() noexcept override = default;
diff --git a/cppcache/include/geode/DataInput.hpp 
b/cppcache/include/geode/DataInput.hpp
index 23a771a..262bf58 100644
--- a/cppcache/include/geode/DataInput.hpp
+++ b/cppcache/include/geode/DataInput.hpp
@@ -381,7 +381,7 @@ class APACHE_GEODE_EXPORT DataInput {
     } else {
       int8_t** tmpArray;
       int32_t* tmpLengtharr;
-      _GEODE_NEW(tmpArray, int8_t* [arrLen]);
+      _GEODE_NEW(tmpArray, int8_t * [arrLen]);
       _GEODE_NEW(tmpLengtharr, int32_t[arrLen]);
       for (int i = 0; i < arrLen; i++) {
         readBytes(&tmpArray[i], &tmpLengtharr[i]);
diff --git a/cppcache/src/CacheTransactionManagerImpl.cpp 
b/cppcache/src/CacheTransactionManagerImpl.cpp
index 9baf25d..0467cea 100644
--- a/cppcache/src/CacheTransactionManagerImpl.cpp
+++ b/cppcache/src/CacheTransactionManagerImpl.cpp
@@ -160,9 +160,7 @@ GfErrType CacheTransactionManagerImpl::rollback(TXState*, 
bool) {
       case TcrMessage::EXCEPTION: {
         break;
       }
-      default: {
-        break;
-      }
+      default: { break; }
     }
   }
 
diff --git a/cppcache/src/ExceptionTypes.cpp b/cppcache/src/ExceptionTypes.cpp
index 252a0ee..213e2f5 100644
--- a/cppcache/src/ExceptionTypes.cpp
+++ b/cppcache/src/ExceptionTypes.cpp
@@ -73,8 +73,8 @@ using apache::geode::client::UnknownException;
   throw NotConnectedException{message};
 }
 
-[[noreturn]] void messageException(std::string message, std::string& exMsg,
-                                   GfErrType, std::string) {
+    [[noreturn]] void messageException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": message from server could not be 
handled");
   throw MessageException{message};
@@ -93,8 +93,8 @@ using apache::geode::client::UnknownException;
   throw CacheServerException{message};
 }
 
-[[noreturn]] void notOwnerException(std::string message, std::string& exMsg,
-                                    GfErrType, std::string) {
+    [[noreturn]] void notOwnerException(std::string message, std::string& 
exMsg,
+                                        GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": not own the lock");
   throw NotOwnerException{message};
 }
@@ -110,9 +110,9 @@ using apache::geode::client::UnknownException;
   throw IllegalStateException{message};
 }
 
-[[noreturn]] void illegalArgumentException(std::string message,
-                                           std::string& exMsg, GfErrType err,
-                                           std::string) {
+    [[noreturn]] void illegalArgumentException(std::string message,
+                                               std::string& exMsg,
+                                               GfErrType err, std::string) {
   if (err == GF_CACHE_ILLEGAL_ARGUMENT_EXCEPTION) {
     message.append(!exMsg.empty() ? exMsg : ": illegal argument");
   }
@@ -140,8 +140,9 @@ using apache::geode::client::UnknownException;
   throw CacheWriterException{message};
 }
 
-[[noreturn]] void cacheLoaderException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+    [[noreturn]] void cacheLoaderException(std::string message,
+                                           std::string& exMsg, GfErrType,
+                                           std::string) {
   message.append(!exMsg.empty() ? exMsg : ": exception in CacheLoader");
   throw CacheLoaderException{message};
 }
@@ -153,9 +154,9 @@ using apache::geode::client::UnknownException;
   throw CacheListenerException{message};
 }
 
-[[noreturn]] void regionDestroyedException(std::string message,
-                                           std::string& exMsg, GfErrType err,
-                                           std::string) {
+    [[noreturn]] void regionDestroyedException(std::string message,
+                                               std::string& exMsg,
+                                               GfErrType err, std::string) {
   if (err == GF_CACHE_REGION_INVALID) {
     message.append(!exMsg.empty() ? exMsg : ": region not valid");
   }
@@ -171,8 +172,8 @@ using apache::geode::client::UnknownException;
   throw CacheProxyException{message};
 }
 
-[[noreturn]] void geodeIOException(std::string message, std::string& exMsg,
-                                   GfErrType, std::string) {
+    [[noreturn]] void geodeIOException(std::string message, std::string& exMsg,
+                                       GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Input/Output error in operation");
   throw GeodeIOException{message};
 }
@@ -183,8 +184,8 @@ using apache::geode::client::UnknownException;
   throw NoSystemException{message};
 }
 
-[[noreturn]] void timeoutException(std::string message, std::string& exMsg,
-                                   GfErrType err, std::string) {
+    [[noreturn]] void timeoutException(std::string message, std::string& exMsg,
+                                       GfErrType err, std::string) {
   if (err == GF_CLIENT_WAIT_TIMEOUT) {
     message.append(!exMsg.empty()
                        ? exMsg
@@ -201,9 +202,9 @@ using apache::geode::client::UnknownException;
   throw OutOfMemoryException{message};
 }
 
-[[noreturn]] void bufferSizeExceededException(std::string message,
-                                              std::string& exMsg, GfErrType,
-                                              std::string) {
+    [[noreturn]] void bufferSizeExceededException(std::string message,
+                                                  std::string& exMsg, 
GfErrType,
+                                                  std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Buffer Size Exceeded");
   throw BufferSizeExceededException{message};
 }
@@ -214,8 +215,9 @@ using apache::geode::client::UnknownException;
   throw LeaseExpiredException{message};
 }
 
-[[noreturn]] void regionExistsException(std::string message, std::string& 
exMsg,
-                                        GfErrType, std::string) {
+    [[noreturn]] void regionExistsException(std::string message,
+                                            std::string& exMsg, GfErrType,
+                                            std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Named Region Exists");
   throw RegionExistsException{message};
 }
@@ -227,8 +229,9 @@ using apache::geode::client::UnknownException;
   throw EntryNotFoundException{message};
 }
 
-[[noreturn]] void entryExistsException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+    [[noreturn]] void entryExistsException(std::string message,
+                                           std::string& exMsg, GfErrType,
+                                           std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Entry already exists in the region");
   throw EntryExistsException{message};
@@ -241,8 +244,9 @@ using apache::geode::client::UnknownException;
   throw EntryDestroyedException{message};
 }
 
-[[noreturn]] void cacheClosedException(std::string message, std::string& exMsg,
-                                       GfErrType, std::string) {
+    [[noreturn]] void cacheClosedException(std::string message,
+                                           std::string& exMsg, GfErrType,
+                                           std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Cache has been closed");
   throw CacheClosedException{message};
 }
@@ -256,9 +260,9 @@ using apache::geode::client::UnknownException;
   throw StatisticsDisabledException{message};
 }
 
-[[noreturn]] void concurrentModificationException(std::string message,
-                                                  std::string& exMsg, 
GfErrType,
-                                                  std::string) {
+    [[noreturn]] void concurrentModificationException(std::string message,
+                                                      std::string& exMsg,
+                                                      GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Concurrent modification in the cache");
   throw ConcurrentModificationException{message};
@@ -271,9 +275,9 @@ using apache::geode::client::UnknownException;
   throw NotAuthorizedException{message};
 }
 
-[[noreturn]] void authenticationFailedException(std::string message,
-                                                std::string& exMsg, GfErrType,
-                                                std::string) {
+    [[noreturn]] void authenticationFailedException(std::string message,
+                                                    std::string& exMsg,
+                                                    GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": authentication failed");
   throw AuthenticationFailedException{message};
 }
@@ -285,9 +289,9 @@ using apache::geode::client::UnknownException;
   throw AuthenticationRequiredException{message};
 }
 
-[[noreturn]] void duplicateDurableClientException(std::string message,
-                                                  std::string& exMsg, 
GfErrType,
-                                                  std::string) {
+    [[noreturn]] void duplicateDurableClientException(std::string message,
+                                                      std::string& exMsg,
+                                                      GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Duplicate Durable Client Id");
   throw DuplicateDurableClientException{message};
 }
@@ -298,8 +302,10 @@ using apache::geode::client::UnknownException;
   throw QueryException{message};
 }
 
-[[noreturn]] void noAvailableLocatorsException(std::string, std::string& exMsg,
-                                               GfErrType, std::string func) {
+    [[noreturn]] void noAvailableLocatorsException(std::string,
+                                                   std::string& exMsg,
+                                                   GfErrType,
+                                                   std::string func) {
   try {
     throw NoAvailableLocatorsException{
         func + (!exMsg.empty() ? exMsg : ": No locators available")};
@@ -316,9 +322,9 @@ using apache::geode::client::UnknownException;
   throw AllConnectionsInUseException{message};
 }
 
-[[noreturn]] void functionExecutionException(std::string message,
-                                             std::string& exMsg, GfErrType,
-                                             std::string) {
+    [[noreturn]] void functionExecutionException(std::string message,
+                                                 std::string& exMsg, GfErrType,
+                                                 std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Function execution failed");
   throw FunctionExecutionException{message};
 }
@@ -329,8 +335,8 @@ using apache::geode::client::UnknownException;
   throw DiskFailureException{message};
 }
 
-[[noreturn]] void rollbackException(std::string message, std::string& exMsg,
-                                    GfErrType, std::string) {
+    [[noreturn]] void rollbackException(std::string message, std::string& 
exMsg,
+                                        GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": Transaction rolled back");
   throw RollbackException{message};
 }
@@ -342,9 +348,10 @@ using apache::geode::client::UnknownException;
   throw CommitConflictException{message};
 }
 
-[[noreturn]] void transactionDataRebalancedException(std::string message,
-                                                     std::string& exMsg,
-                                                     GfErrType, std::string) {
+    [[noreturn]] void transactionDataRebalancedException(std::string message,
+                                                         std::string& exMsg,
+                                                         GfErrType,
+                                                         std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Transaction data rebalanced exception");
   throw TransactionDataRebalancedException{message};
@@ -360,9 +367,9 @@ using apache::geode::client::UnknownException;
   throw TransactionDataNodeHasDepartedException{message};
 }
 
-[[noreturn]] void putAllPartialResultException(std::string message,
-                                               std::string& exMsg, GfErrType,
-                                               std::string) {
+    [[noreturn]] void putAllPartialResultException(std::string message,
+                                                   std::string& exMsg,
+                                                   GfErrType, std::string) {
   message.append(!exMsg.empty() ? exMsg : ": PutAll Partial exception");
   throw PutAllPartialResultException{message};
 }
@@ -373,9 +380,9 @@ using apache::geode::client::UnknownException;
   throw LowMemoryException{message};
 }
 
-[[noreturn]] void queryLowMemoryException(std::string message,
-                                          std::string& exMsg, GfErrType,
-                                          std::string) {
+    [[noreturn]] void queryLowMemoryException(std::string message,
+                                              std::string& exMsg, GfErrType,
+                                              std::string) {
   message.append(!exMsg.empty() ? exMsg
                                 : ": Query execution low memory exception");
   throw QueryExecutionLowMemoryException{message};
diff --git a/cppcache/src/RegionAttributes.cpp 
b/cppcache/src/RegionAttributes.cpp
index f576ad1..4276d71 100644
--- a/cppcache/src/RegionAttributes.cpp
+++ b/cppcache/src/RegionAttributes.cpp
@@ -64,9 +64,8 @@ std::shared_ptr<CacheLoader> 
RegionAttributes::getCacheLoader() const {
     if (CacheXmlParser::managedCacheLoaderFn_ &&
         m_cacheLoaderFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_cacheLoader.reset((
-          CacheXmlParser::managedCacheLoaderFn_)(m_cacheLoaderLibrary.c_str(),
-                                                 
m_cacheLoaderFactory.c_str()));
+      m_cacheLoader.reset((CacheXmlParser::managedCacheLoaderFn_)(
+          m_cacheLoaderLibrary.c_str(), m_cacheLoaderFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<CacheLoader*()>(
           m_cacheLoaderLibrary, m_cacheLoaderFactory);
@@ -81,9 +80,8 @@ std::shared_ptr<CacheWriter> 
RegionAttributes::getCacheWriter() const {
     if (CacheXmlParser::managedCacheWriterFn_ &&
         m_cacheWriterFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_cacheWriter.reset((
-          CacheXmlParser::managedCacheWriterFn_)(m_cacheWriterLibrary.c_str(),
-                                                 
m_cacheWriterFactory.c_str()));
+      m_cacheWriter.reset((CacheXmlParser::managedCacheWriterFn_)(
+          m_cacheWriterLibrary.c_str(), m_cacheWriterFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<CacheWriter*()>(
           m_cacheWriterLibrary, m_cacheWriterFactory);
@@ -98,11 +96,8 @@ std::shared_ptr<CacheListener> 
RegionAttributes::getCacheListener() const {
     if (CacheXmlParser::managedCacheListenerFn_ &&
         m_cacheListenerFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_cacheListener.reset(
-          (CacheXmlParser::managedCacheListenerFn_)(m_cacheListenerLibrary
-                                                        .c_str(),
-                                                    m_cacheListenerFactory
-                                                        .c_str()));
+      m_cacheListener.reset((CacheXmlParser::managedCacheListenerFn_)(
+          m_cacheListenerLibrary.c_str(), m_cacheListenerFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<CacheListener*()>(
           m_cacheListenerLibrary, m_cacheListenerFactory);
@@ -118,10 +113,9 @@ std::shared_ptr<PartitionResolver> 
RegionAttributes::getPartitionResolver()
     if (CacheXmlParser::managedPartitionResolverFn_ &&
         m_partitionResolverFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_partitionResolver.reset((
-          CacheXmlParser::
-              managedPartitionResolverFn_)(m_partitionResolverLibrary.c_str(),
-                                           
m_partitionResolverFactory.c_str()));
+      m_partitionResolver.reset((CacheXmlParser::managedPartitionResolverFn_)(
+          m_partitionResolverLibrary.c_str(),
+          m_partitionResolverFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<PartitionResolver*()>(
           m_partitionResolverLibrary, m_partitionResolverFactory);
@@ -137,11 +131,8 @@ std::shared_ptr<PersistenceManager> 
RegionAttributes::getPersistenceManager()
     if (CacheXmlParser::managedPersistenceManagerFn_ &&
         m_persistenceFactory.find('.') != std::string::npos) {
       // this is a managed library
-      m_persistenceManager.reset(
-          (CacheXmlParser::managedPersistenceManagerFn_)(m_persistenceLibrary
-                                                             .c_str(),
-                                                         m_persistenceFactory
-                                                             .c_str()));
+      
m_persistenceManager.reset((CacheXmlParser::managedPersistenceManagerFn_)(
+          m_persistenceLibrary.c_str(), m_persistenceFactory.c_str()));
     } else {
       auto funcptr = Utils::getFactoryFunction<PersistenceManager*()>(
           m_persistenceLibrary, m_persistenceFactory);
diff --git a/cppcache/src/VersionedCacheableObjectPartList.cpp 
b/cppcache/src/VersionedCacheableObjectPartList.cpp
index 3dd4639..15b8ea3 100644
--- a/cppcache/src/VersionedCacheableObjectPartList.cpp
+++ b/cppcache/src/VersionedCacheableObjectPartList.cpp
@@ -232,9 +232,7 @@ void VersionedCacheableObjectPartList::fromData(DataInput& 
input) {
           versionTag->setInternalMemID(ids.at(idNumber));
           break;
         }
-        default: {
-          break;
-        }
+        default: { break; }
       }
       m_versionTags[index] = versionTag;
     }

Reply via email to