Make code self-documenting by using symbolic constants

This commit is contained in:
Nik Bougalis
2017-04-13 11:31:38 -07:00
committed by seelabs
parent 397410bac6
commit 3666948610
5 changed files with 28 additions and 33 deletions

View File

@@ -25,6 +25,7 @@
#include <ripple/basics/Log.h>
#include <ripple/basics/StringUtilities.h>
#include <ripple/protocol/st.h>
#include <ripple/protocol/Protocol.h>
#include <ripple/protocol/Quality.h>
#include <boost/algorithm/string.hpp>
#include <cassert>
@@ -100,14 +101,6 @@ bool fix1449 (NetClock::time_point const closeTime)
return closeTime > fix1449Time();
}
// VFALCO NOTE A copy of the other one for now
/** Maximum number of entries in a directory page
A change would be protocol-breaking.
*/
#ifndef DIR_NODE_MAX
#define DIR_NODE_MAX 32
#endif
//------------------------------------------------------------------------------
//
// Observers
@@ -864,7 +857,7 @@ dirAdd (ApplyView& view,
svIndexes = sleNode->getFieldV256 (sfIndexes);
if (DIR_NODE_MAX != svIndexes.size ())
if (dirNodeMaxEntries != svIndexes.size ())
{
// Add to current node.
view.update(sleNode);