From 500bddebffab6725faaca3aee5366a6ca2ff2f78 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sat, 5 Oct 2013 02:46:23 -0700 Subject: [PATCH] Allow CycledSet to grow without bounds --- src/ripple/types/api/CycledSet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ripple/types/api/CycledSet.h b/src/ripple/types/api/CycledSet.h index a8cadb838..cfee79415 100644 --- a/src/ripple/types/api/CycledSet.h +++ b/src/ripple/types/api/CycledSet.h @@ -53,7 +53,7 @@ public: typedef typename ContainerType::const_pointer const_pointer; explicit CycledSet ( - size_type item_max, + size_type item_max = 0, // 0 means no limit Hash hash = Hash(), KeyEqual equal = KeyEqual(), Allocator alloc = Allocator()) @@ -69,7 +69,7 @@ public: // Returns `true` if the next real insert would swap bool full() const { - return m_front.size() >= m_max; + return (m_max != 0) && m_front.size() >= m_max; } // Adds the key to the front if its not in either map