mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-25 05:25:55 +00:00
Change shared_polymorphic_downcast to dynamic_pointer_cast.
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/make_shared.hpp>
|
#include <boost/make_shared.hpp>
|
||||||
|
#include <boost/pointer_cast.hpp>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
@@ -279,7 +280,7 @@ void LedgerAcquire::addPeers()
|
|||||||
|
|
||||||
boost::weak_ptr<PeerSet> LedgerAcquire::pmDowncast()
|
boost::weak_ptr<PeerSet> LedgerAcquire::pmDowncast()
|
||||||
{
|
{
|
||||||
return boost::shared_polymorphic_downcast<PeerSet>(shared_from_this());
|
return boost::dynamic_pointer_cast<PeerSet>(shared_from_this());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LADispatch(
|
static void LADispatch(
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
|
#include <boost/pointer_cast.hpp>
|
||||||
|
|
||||||
#include "Pathfinder.h"
|
#include "Pathfinder.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
@@ -2767,7 +2768,7 @@ Json::Value RPCHandler::doSubscribe(Json::Value jvRequest, int& cost, ScopedLock
|
|||||||
cLog(lsDEBUG) << boost::str(boost::format("doSubscribe: building: %s") % strUrl);
|
cLog(lsDEBUG) << boost::str(boost::format("doSubscribe: building: %s") % strUrl);
|
||||||
|
|
||||||
RPCSub::pointer rspSub = boost::make_shared<RPCSub>(strUrl, strUsername, strPassword);
|
RPCSub::pointer rspSub = boost::make_shared<RPCSub>(strUrl, strUsername, strPassword);
|
||||||
ispSub = mNetOps->addRpcSub(strUrl, boost::shared_polymorphic_downcast<InfoSub>(rspSub));
|
ispSub = mNetOps->addRpcSub(strUrl, boost::dynamic_pointer_cast<InfoSub>(rspSub));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/unordered_set.hpp>
|
#include <boost/unordered_set.hpp>
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
|
#include <boost/pointer_cast.hpp>
|
||||||
|
|
||||||
#include "../json/writer.h"
|
#include "../json/writer.h"
|
||||||
|
|
||||||
@@ -92,7 +93,7 @@ void TransactionAcquire::onTimer(bool progress)
|
|||||||
|
|
||||||
boost::weak_ptr<PeerSet> TransactionAcquire::pmDowncast()
|
boost::weak_ptr<PeerSet> TransactionAcquire::pmDowncast()
|
||||||
{
|
{
|
||||||
return boost::shared_polymorphic_downcast<PeerSet>(shared_from_this());
|
return boost::dynamic_pointer_cast<PeerSet>(shared_from_this());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TransactionAcquire::trigger(Peer::ref peer)
|
void TransactionAcquire::trigger(Peer::ref peer)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include <boost/weak_ptr.hpp>
|
#include <boost/weak_ptr.hpp>
|
||||||
#include <boost/asio.hpp>
|
#include <boost/asio.hpp>
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
|
#include <boost/pointer_cast.hpp>
|
||||||
|
|
||||||
#include "WSDoor.h"
|
#include "WSDoor.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
@@ -126,7 +127,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
int cost = 10;
|
int cost = 10;
|
||||||
RPCHandler mRPCHandler(&mNetwork, boost::shared_polymorphic_downcast<InfoSub>(this->shared_from_this()));
|
RPCHandler mRPCHandler(&mNetwork, boost::dynamic_pointer_cast<InfoSub>(this->shared_from_this()));
|
||||||
Json::Value jvResult(Json::objectValue);
|
Json::Value jvResult(Json::objectValue);
|
||||||
|
|
||||||
int iRole = mHandler->getPublic()
|
int iRole = mHandler->getPublic()
|
||||||
|
|||||||
Reference in New Issue
Block a user