You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by jb...@apache.org on 2017/03/01 23:35:21 UTC

[16/21] geode-native git commit: GEODE-2494: Reverts conversion to pointer from ref.

GEODE-2494: Reverts conversion to pointer from ref.


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

Branch: refs/heads/develop
Commit: b168e38990e11c9b7351bf389dac61663b3033fe
Parents: 2eb71ee
Author: Jacob Barrett <jb...@pivotal.io>
Authored: Tue Feb 28 08:39:16 2017 -0800
Committer: Jacob Barrett <jb...@pivotal.io>
Committed: Wed Mar 1 15:10:43 2017 -0800

----------------------------------------------------------------------
 src/cppcache/src/LRUList.cpp | 8 ++++----
 src/cppcache/src/LRUList.hpp | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/b168e389/src/cppcache/src/LRUList.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.cpp b/src/cppcache/src/LRUList.cpp
index 00879c9..92b32f9 100644
--- a/src/cppcache/src/LRUList.cpp
+++ b/src/cppcache/src/LRUList.cpp
@@ -72,7 +72,7 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
   bool isLast = false;
   LRUListNode* aNode;
   while (true) {
-    aNode = getHeadNode(&isLast);
+    aNode = getHeadNode(isLast);
     if (aNode == nullptr) {
       result = NULLPTR;
       break;
@@ -102,7 +102,7 @@ void LRUList<TEntry, TCreateEntry>::getLRUEntry(LRUListEntryPtr& result) {
 
 template <typename TEntry, typename TCreateEntry>
 typename LRUList<TEntry, TCreateEntry>::LRUListNode*
-LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
+LRUList<TEntry, TCreateEntry>::getHeadNode(bool& isLast) {
   std::lock_guard<spinlock_mutex> lk(m_headLock);
 
   LRUListNode* result = m_headNode;
@@ -114,7 +114,7 @@ LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
     nextNode = m_headNode->getNextLRUListNode();
     if (nextNode == nullptr) {
       // last one in the list...
-      *isLast = true;
+      isLast = true;
       LRUListEntryPtr entry;
       result->getEntry(entry);
       if (entry->getLRUProperties().testEvicted()) {
@@ -127,7 +127,7 @@ LRUList<TEntry, TCreateEntry>::getHeadNode(bool* isLast) {
     }
   }
 
-  *isLast = false;
+  isLast = false;
   // advance head node, and return old value.
   m_headNode = nextNode;
 

http://git-wip-us.apache.org/repos/asf/geode-native/blob/b168e389/src/cppcache/src/LRUList.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/LRUList.hpp b/src/cppcache/src/LRUList.hpp
index 0364ac6..2db5a09 100644
--- a/src/cppcache/src/LRUList.hpp
+++ b/src/cppcache/src/LRUList.hpp
@@ -141,7 +141,7 @@ class LRUList {
    * @brief return the head entry in the list,
    * and removing it from the list.
    */
-  LRUListNode* getHeadNode(bool* isLast);
+  LRUListNode* getHeadNode(bool& isLast);
 
   spinlock_mutex m_headLock;
   spinlock_mutex m_tailLock;