mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 01:07:57 +00:00
Rename members for clarity
This commit is contained in:
@@ -151,7 +151,7 @@ Pathfinder::Pathfinder(RLCache::ref cache,
|
||||
|
||||
theApp->getOrderBookDB().setup(mLedger);
|
||||
|
||||
mLoadMonitor = theApp->getJobQueue().getLoadEvent(jtPATH_FIND, "FindPath");
|
||||
m_loadEvent = theApp->getJobQueue().getLoadEvent(jtPATH_FIND, "FindPath");
|
||||
|
||||
// Construct the default path for later comparison.
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ private:
|
||||
|
||||
Ledger::pointer mLedger;
|
||||
PathState::pointer mPsDefault;
|
||||
LoadEvent::pointer mLoadMonitor;
|
||||
LoadEvent::pointer m_loadEvent;
|
||||
RLCache::pointer mRLCache;
|
||||
|
||||
boost::unordered_map<uint160, AccountItems::pointer> mRLMap;
|
||||
|
||||
@@ -21,8 +21,7 @@ Job::Job (JobType type,
|
||||
, mJob (job)
|
||||
, mName (name)
|
||||
{
|
||||
// VFALCO NOTE what the heck does this do?
|
||||
mLoadMonitor = boost::make_shared <LoadEvent> (boost::ref (lm), name, false);
|
||||
m_loadEvent = boost::make_shared <LoadEvent> (boost::ref (lm), name, false);
|
||||
}
|
||||
|
||||
JobType Job::getType() const
|
||||
@@ -32,9 +31,15 @@ JobType Job::getType() const
|
||||
|
||||
void Job::doJob ()
|
||||
{
|
||||
mLoadMonitor->start();
|
||||
m_loadEvent->start();
|
||||
|
||||
mJob (*this);
|
||||
mLoadMonitor->reName(mName);
|
||||
|
||||
// VFALCO TODO Isn't there a way to construct the load event with
|
||||
// the proper name? This way the load event object
|
||||
// can have the invariant "name is always set"
|
||||
//
|
||||
m_loadEvent->reName (mName);
|
||||
}
|
||||
|
||||
void Job::rename (std::string const& newName)
|
||||
|
||||
@@ -42,9 +42,18 @@ enum JobType
|
||||
class Job
|
||||
{
|
||||
public:
|
||||
/** Default constructor.
|
||||
|
||||
// VFALCO TODO find out why these extra constructors are needed
|
||||
Job();
|
||||
Allows Job to be used as a container type.
|
||||
|
||||
This is used to allow things like jobMap [key] = value.
|
||||
*/
|
||||
// VFALCO NOTE I'd prefer not to have a default constructed object.
|
||||
// What is the semantic meaning of a Job with no associated
|
||||
// function? Having the invariant "all Job objects refer to
|
||||
// a job" would reduce the number of states.
|
||||
//
|
||||
Job ();
|
||||
|
||||
Job (JobType type, uint64 index);
|
||||
|
||||
@@ -73,8 +82,7 @@ private:
|
||||
JobType mType;
|
||||
uint64 mJobIndex;
|
||||
FUNCTION_TYPE <void (Job&)> mJob;
|
||||
// VFALCO TODO why is this called mLoadMonitor if the type is LoadEvent pointer?
|
||||
LoadEvent::pointer mLoadMonitor;
|
||||
LoadEvent::pointer m_loadEvent;
|
||||
std::string mName;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user